This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

__main undefined symbol


Thanks to William Gatliff and Kenneth Porter, I know a bit more about this
__main and I've been able to fix the problem.

But... I find it annoying to have this __main in my C file, and I did some
searching in the mail archive of this list to find that linking with
libgcc.a should fix my problem. 

This libgcc.a file is present in the directory where I've built the actual
compiler but in the the resulting installation lib directory

Looking at the sources I've also found that this __main should be called
from the crt0 or crt1, and for many architecture it is true but I did a grep
inside all those find inside the installation directory and the only files
containing the __main symbol are the tools themselve???

Is it something wrong with my installation or configuration?

Just to be clear I understand the purpose of __main but as I'm not doing c++
in this one I'd like to get rid of this problem in a clean way. Meanwhile
I've the fix provided by William (putting __main at the end of the source
file)

Thanks

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]