Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: stleric on November 19, 2012, 12:15:47 PM

Title: Programming in TC
Post by: stleric on November 19, 2012, 12:15:47 PM
Hello,

Are there any quirks associated with programming in the TinyCore environment?  In particular, do I have to do anything special to have gcc find include files?  I tried to write a simple 'hello world' type program for ncurses and gcc complained that it couldn't find stdio.h (pretty sure I did this in 3.5 w/o problems).

For this (4.7) and my previous TC installation (3.5) I installed just the gcc package, should I really be installing the compiletc package instead?  (My hazy recollection is that gcc was sufficient when I was on 3.5, but maybe it was beginner's luck).

I've been doing a bunch of crazy stuff with 4.7 so my plan is to wipe it out and start from scratch to get a better sense of what's going on.  BTW, I'm just doing userland programs and trying to port over some DOS stuff that does port i/o with an ISA card.

TIA for any info,
eric
Title: Re: Programming in TC
Post by: Rich on November 19, 2012, 12:50:22 PM
Hi stleric
Yes, you should install  compiletc  if you plan on programming for the Tinycore environment.
Title: Re: Programming in TC
Post by: ananix on November 20, 2012, 04:21:11 AM
When you have compiletc installed use the "provides" search function in TCL Apps. In 99% of my cases it finds the right lib for the missing header file. If its still having problems finding it, find it you self on your file system, check to see if the path correspond with where your compiler is looking. If not, then use symbolic links in the filesystem to correct it.
Title: Re: Programming in TC
Post by: Rich on November 20, 2012, 06:42:18 AM
Hi stleric
Running:
Code: [Select]
sudo find /usr/ -name stdio.hon my system returns:
Code: [Select]
/usr/include/stdio.h
/usr/include/bits/stdio.h
/usr/local/include/c++/4.6.1/tr1/stdio.h
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.1/include/ssp/stdio.h
I believe  /usr/include/stdio.h  is the required file which is provided by  eglibc_base-dev.tcz. Install  compiletce
and the problem should be fixed.
Title: Re: Programming in TC
Post by: stleric on November 20, 2012, 10:10:06 AM
Hi stleric
Running:
Code: [Select]
sudo find /usr/ -name stdio.hon my system returns:
Code: [Select]
/usr/include/stdio.h
/usr/include/bits/stdio.h
/usr/local/include/c++/4.6.1/tr1/stdio.h
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.1/include/ssp/stdio.h
I believe  /usr/include/stdio.h  is the required file which is provided by  eglibc_base-dev.tcz. Install  compiletce
and the problem should be fixed.

Rich,

Right, in my experience stdio.h is right in the /usr/include (maybe /usr/local/include, sometimes).  That was not the case with this last install (I installed gcc and make, and then after a bunch of other stuff, compiletc).  However I just did a clean reinstall with just compiletc and it's now fine, stdio.h is right where it's supposed to be.  Odd.

Thanks for the help,
eric
Title: Re: Programming in TC
Post by: stleric on November 20, 2012, 10:18:55 AM
When you have compiletc installed use the "provides" search function in TCL Apps. In 99% of my cases it finds the right lib for the missing header file. If its still having problems finding it, find it you self on your file system, check to see if the path correspond with where your compiler is looking. If not, then use symbolic links in the filesystem to correct it.

I do what now?  I'm in Apps, I see the 'Provides' item but I have no idea what to do after that.
Title: Re: Programming in TC
Post by: bmarkus on November 20, 2012, 10:22:38 AM
You do not need provide. Do not mismatch your setup, just intstall compiletc and 98% of sorces can be compiled.
Title: Re: Programming in TC
Post by: ananix on November 20, 2012, 11:51:41 AM
I do what now?  I'm in Apps, I see the 'Provides' item but I have no idea what to do after that.

  search for missing file.

  I used to have problems finding the correct libraries for missing headers and on some distroes fight with dependencies, not on TCL :)