Undefined symbol error when linking with g++.
Kenneth R Leach
kleach2@csc.com
Fri Mar 12 18:58:00 GMT 2004
We recently upgraded our GNU GCC compiler from 2.95.2 to 3.2.3. When
attempting to compile one of our system libraries, the following error is
reported.
Undefined symbol _XmStrings21 first reference in file
window_lib.a(color_util.o)
ld: fatal: Symbol referencing errors. No output written to demo
collect2: ld returned 1 exit status
However, this library builds fine with our 2.95.2 version.
The differences are that the 2.95.2 compiler was prebuilt for our OS and
the 3.2.3, we built. Plus the binutils are part of the 2.95.2 version,
where as we built ours and installed them in a separate directory.
In the makefile, the linker is called by the $(LINK) macro, which is
evaluating to g++. I performed a test and found that if I replace the
$(LINK) macro with "ld", which is the binutils "ld", the library compiles.
Any ideas why the new GCC is having a problem, where the old one did not?
Any assistance would be greatly appreciated.
Thanks.
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
More information about the Gcc-help
mailing list