Undefined symbols with gcc

Philip Cheng cheng@PCIgeomatics.com
Thu Feb 21 13:56:00 GMT 2002


Glenn:

I got the same problem also.  I use Linux 7.2 and gcc 3.0.3.
When I compiled my problem with -g, I got undefined LC5.
It does not happen if I compile with optimize mode.
This problem does not happen in 2.95.  I suspect there is a bug
in the gcc when using -g option.  Seems it happens if there is some
matrix calculation.

Philip

On Thu, 21 Feb 2002, Glenn Meuth wrote:

> Greetings all,
>     I am trying to find out why I have 2 symbols undefined when using 
> gcc.  I am running Redhat 7.0, with a gcc-3.0.3 compiler built with 
> --enable-threads.  A typical command line is:
> 
> gcc -g -DNN_DPK -DHAVE_CONFIG_H -DLINUX -DVAXULT -DULTRIX -c nn_math2.c 
> -o  lib/nn_math2.o
> 
>     The two symbols that are undefined (as reported by the linker):
> (...)/nn_math2.c:2754: undefined reference to `LC55'
> (...)/nn_math2.c:2754: undefined reference to `LC61'
> 
>     I have noticed from nm that the symbols are indeed not defined in 
> nn_math2.o.  However, when I run without debug information turned on, it 
> works fine.  Any idea's?  Currently, I have tried building gcc with 
> binutils 2.11.2 to see if there was an issue with the assembler or 
> something, there appears not to be.  
> 
> 
> AdvaTHANKSnce!
> 
> Glenn
> glenn@answerontech.com
> 
>    
> 
> 
> 



More information about the Gcc-help mailing list