[ale] G++/ --main() question
John Mills
jmmills at avana.net
Mon Jun 14 23:13:57 EDT 1999
Greetings - I'm new to cross-platform 'gcc' and to C++, so this is
probably a simple question.
I have a simple program - one "real" object and the three or so supporting
files to target an embedded processor (SH-2). Compiles and links perfectly
when compiling with <target>-gcc. I changed the name from <name>.c to
<name>.cpp (with no changes to the other files), and tried to compile than
object with <target>-g++. Now the link fails, with a reported unresolved
label "__main()". <sample>.cpp includes both its original 'main(void)'
and also a reference line: 'int __main(){}' which was in the example I'm
starting from. Same results with or without that reference. I suppose this
is must be a FAQ, but I would be grateful for any direction.
I'm working with 'ecosSWtools-990319' from Cygnus, under RH6.0. I have a
parallel installation under RH4.2, but haven't tried this there, yet.
TIA for any suggestions. I'll be happy to provide more details to anyone.
Regards -
John Mills
More information about the Ale
mailing list