[ale] G++/ --main() question

David Corbin dcorbin at corvusware.com
Tue Jun 15 06:07:54 EDT 1999


Probably, the signature should be...

int main(int argc, char **argv)

David Corbin
----- Original Message -----
 From: John Mills <jmmills at avana.net>
To: Atlanta Linux Enthusiasts <ale at ale.org>
Sent: Monday, June 14, 1999 11:13 PM
Subject: [ale] G++/ --main() question


>
> 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