Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: TCC won't compile, Error:Undefined symbol __libc_start_main< Next Oldest | Next Newest >
Tethys Offline





Group: Members
Posts: 3
Joined: Dec. 2003
Posted: Feb. 07 2004,15:52 QUOTE

I have a very simple program

=====
/*Filename test.c */
int main()
{    int x=2,y=3;
    int z=x+y;
    return 0;
}
=====
I try to compile it using the command

tcc test.c

and it returns the error
Undefined symbol __libc_start_main

It's the same for any program I try. What is the problem? Am I doing something wrong?
Back to top
Profile PM 
enthusi Offline





Group: Members
Posts: 57
Joined: Dec. 2003
Posted: Feb. 07 2004,17:08 QUOTE

yes :)
But  you could hardly have known...
You have to tell TCC to which lib to link. There have been similiar topics arround.
You may wanna have a look at the tcc-how-tos or use a search.
But the direct answer to your problem would be: compile with:
Code Sample
tcc -o test.run -lstdc++-3-libc6.1-2-2.10.0 test.c

You may also wanna take a look at that small TCC-tutorial of mine arround in the How-To-Forum...
That might clear things up a bit when it comes to linking and stuff...
Hope that helps,
enthusi


--------------
silence tells me secretly...
...everything
-------------------------------------------------------------
DSL on
cf-frugal-install on 700Mhz P3, 320 MB ram
cf-frugal & usb for via epia 5000, 512 MB ram
Back to top
Profile PM ICQ 
Tethys Offline





Group: Members
Posts: 3
Joined: Dec. 2003
Posted: Feb. 08 2004,08:36 QUOTE

Ah thanks a lot. That helped :)
Back to top
Profile PM 
2 replies since Feb. 07 2004,15:52 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: TCC won't compile

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code