__main undefined symbol
Scott A Sumner
sasumner@juno.com
Sat Apr 1 00:00:00 GMT 2000
>> I tried the _main() wart trick on my embedded system, but got a
>> linker error so
>> had to back it out.
> Are you saying that the _main() wart was the origin of the linker
> bug?
Yes. Linked fine before the wart, didn't after. Taking a hint from
another response, I simply renamed main() to Main() and then gcc doesn't
sneak in the extra code on me. I can live with *THAT* wart, and so can
ld.
> Hmmm.... are you sure you aren't compiling C++? I'm not exactly
> sure what the
> proper signature for _main() is, is why I ask...
I tried exactly what apparently worked for you in your gdb stub example,
but with no luck. I'd have to be running g++ to get C++, and I know I'm
not doing that.
> The -nostartfiles switch tells gcc to not use the installed crt0.
Awesome. Thanks to everyone who responded!
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list