This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

collect2: ld returned 1 exit status


Dear All,

I tried to compile a program but I got the following error message:

/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../lib64/crt1.o: In function `_start':
../sysdeps/x86_64/elf/start.S:109: undefined reference to `main'
collect2: ld returned 1 exit status


Any advice on what might be the cause of this error is greatly appreciated.

I did the compilation on SuSE 10 Linux as follows:

g++ program.cpp -o program.so

Many thanks for your help.

Regards,
Yuen.



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