This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
collect2: ld returned 1 exit status
- From: "Yuen Sin Cheong" <yuensin78 at hotmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 27 Sep 2006 21:51:05 +0800
- Subject: collect2: ld returned 1 exit status
- Bcc:
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.