Linker problems!!
Siva.Namburi@nokia.com
Siva.Namburi@nokia.com
Sun Nov 21 02:51:00 GMT 1999
Hi,
I am having problems with the linker of gcc2.95.1. I have three
files. Stack.cc, Stack.h and main.cc. The header file is included in both
the Stack.cc and
main.cc files. This is how i compiled to get executable.
1. g++ -c main.cc Stack.cc // no errors
2. g++ -o main.o Stack.o // Error:
Undefined first referenced
symbol in file
main
/rooftop/siva/tools/lib/gcc-lib/sparc-sun-solaris2.5/2.95.1/crt1.o
ld: fatal: Symbol referencing errors. No output written to main.o
collect2: ld returned 1 exit status
I sent this to my instructor also and he said that is the correct way of
compiling. Is this some problem with the way the compiler is installed.
Any suggestions would be greatly helpful.
thanks,
siva
More information about the Gcc-bugs
mailing list