RE: Undefined symbol error when linking with g++.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems that I was able to resolve the problem, although I am not sure
why. When I built my version of GCC 3.2.3, I used the GCC 2.95.2 compiler.
However, I built my Binutils with the 3.2.3 compiler, after it was
finished.

I tried just about everything else to get the problem resolved so, I
decided why not rebuild the Binutils with the same version of GCC used to
build the new GCC. So, I did and it worked.

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.
----------------------------------------------------------------------------------------




                                                                                                                                       
                      lrtaylor                                                                                                         
                      @micron.com              To:      Kenneth R Leach/CIV/CSC@CSC                                                    
                                               cc:      <gcc-help@xxxxxxxxxxx>                                                         
                      03/12/2004 02:03         Subject: RE: Undefined symbol error when linking with g++.                              
                      PM                                                                                                               
                                                                                                                                       
                                                                                                                                       




Hmmm...  Does g++ resolve to your old or new compiler?  For example, if
you just type "g++ -v" at the prompt, which compiler do you get?  If you
get the old one, perhaps you can change LINK to point explicitly to the
new compiler.

Other than that, I'm not sure...

Good luck,
Lyle

-----Original Message-----
From: Kenneth R Leach [mailto:kleach2@xxxxxxx]
Sent: Friday, March 12, 2004 11:58 AM
To: lrtaylor
Cc: gcc-help@xxxxxxxxxxx
Subject: RE: Undefined symbol error when linking with g++.


Lyle,

I did recompile the entire library. Any other thoughts?

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.
------------------------------------------------------------------------
----------------






                      lrtaylor

                      @micron.com              To:      Kenneth R
Leach/CIV/CSC@CSC, <gcc-help@xxxxxxxxxxx>
                                               cc:

                      03/12/2004 01:15         Subject: RE: Undefined
symbol error when linking with g++.
                      PM









If window_lib.a is a C++ library that was compiled with the old
compiler, then you will have to rebuild it with the new compiler in
order to use it with the new compiler.  C++ code built with the old
compiler is not compatible with C++ code built with the new compiler.
Basically, you will have to rebuild all C++ libraries that you're using
with the new compiler.

Cheers,
Lyle


-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Kenneth R Leach
Sent: Friday, March 12, 2004 11:00 AM
To: gcc-help@xxxxxxxxxxx
Subject: Undefined symbol error when linking with g++.

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.
------------------------------------------------------------------------
----------------












[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux