WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: C++ compilation  (Read 3016 times)

Offline trembb22

  • Newbie
  • *
  • Posts: 28
C++ compilation
« on: August 06, 2009, 06:59:25 PM »
I read that the gcc compiler isn't persistent under /usr/local, so a TCZ installation seems to be the best options. am I right if I want a working gcc compiler after a reboot of TC.

There are 2 versions of gcc and there is a version named: compiletc.
which one should I use?

later, I might need to compile modules for TC, what do we need to be able to do that?

thanks for your help

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: C++ compilation
« Reply #1 on: August 06, 2009, 09:16:25 PM »
the safest/easiest way for compiling would be to just grab the compiletc extension which has most tools that are needed for compiling in its dep file.
both tce and tcz extensions are persistent upon reboot as long as there is a persistent storage for them i.e. a tce folder on the root of a partition

note: for exception handling in c++ you will need to use the gcc-4.4.0 extension since it is broken in the 4.2.2 extension for TC 2.x. You will also need to have the gcc-4.4.0 extension installed if you compiled your application with it.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: C++ compilation
« Reply #2 on: August 07, 2009, 12:23:08 AM »
The later revisions of gcc are PPI compatible.  Note that compiletc includes gcc.tcel (4.2.2)

If you mean kernel modules, using compiletc and the linux-headers* package is the recommended base.

Offline trembb22

  • Newbie
  • *
  • Posts: 28
Re: C++ compilation
« Reply #3 on: August 07, 2009, 01:48:13 PM »
thanks
I was able to compile my applications with success.
I installed tinycore on a 1gig usb key with compilation enable and I installed tinycore on a 128MB IDE flash harddisk with only samba and ssh on it, so I compile my programs  with the usb key environment, mount my IDE flash hardisk and copy compiled program into it. That way, I can boot tinycore on the IDE flash hardisk in 20 secondes with my application ready with samba and ssh working.

Booting my usb key take couples of minutes, I thing it is because my usb key is very slow to load tinycore bzImage.

thanks for your help