WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Programming in TC  (Read 4923 times)

Offline stleric

  • Newbie
  • *
  • Posts: 21
Programming in TC
« on: November 19, 2012, 03: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

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11638
Re: Programming in TC
« Reply #1 on: November 19, 2012, 03:50:22 PM »
Hi stleric
Yes, you should install  compiletc  if you plan on programming for the Tinycore environment.

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Programming in TC
« Reply #2 on: November 20, 2012, 07: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.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11638
Re: Programming in TC
« Reply #3 on: November 20, 2012, 09: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.

Offline stleric

  • Newbie
  • *
  • Posts: 21
Re: Programming in TC
« Reply #4 on: November 20, 2012, 01:10:06 PM »
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

Offline stleric

  • Newbie
  • *
  • Posts: 21
Re: Programming in TC
« Reply #5 on: November 20, 2012, 01:18:55 PM »
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.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Programming in TC
« Reply #6 on: November 20, 2012, 01:22:38 PM »
You do not need provide. Do not mismatch your setup, just intstall compiletc and 98% of sorces can be compiled.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Programming in TC
« Reply #7 on: November 20, 2012, 02:51:41 PM »
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 :)