Does anyone know what this might be caused by?
Undefined first referenced
symbol in file
main /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/crt1.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
Does anyone know what this might be caused by?
Undefined first referenced
symbol in file
main /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/crt1.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
Usually crt1 is part of the runtime library to start the application, so it will call main from there. If you are trying to compile something that doesn't contain a "main", then this would be the likely outcome. There are two possible scenarios:
1. You are compiling a file that is a part of a larger application, and you should be compiling it with "-c" to say "don't try to link this to form an application just yet". Eventually you would combine the object files (a.o, b.o, etc) into a complete application.
2. You have a single file applicaiton, but for some reason, it doesn't have a main in it.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Brilliant! Thanks!
So just out of curiosity, which of the two alternatives applied in this case?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.