From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20312 invoked by alias); 15 Mar 2004 17:39:45 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 20253 invoked from network); 15 Mar 2004 17:39:35 -0000 Received: from unknown (HELO amer-mta01.csc.com) (20.137.2.247) by sources.redhat.com with SMTP; 15 Mar 2004 17:39:35 -0000 Received: from csc.com (va-fch32.csc.com [20.6.39.233]) by amer-mta01.csc.com (Switch-3.1.2/Switch-3.1.0) with ESMTP id i2FHgIZB029551 for ; Mon, 15 Mar 2004 12:42:19 -0500 (EST) Subject: RE: Undefined symbol error when linking with g++. To: lrtaylor@micron.com Cc: gcc-help@gcc.gnu.org Message-ID: From: Kenneth R Leach Date: Tue, 16 Mar 2004 15:20:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-SW-Source: 2004-03/txt/msg00137.txt.bz2 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: 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@csc.com] Sent: Friday, March 12, 2004 11:58 AM To: lrtaylor Cc: gcc-help@gcc.gnu.org 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, 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@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On Behalf Of Kenneth R Leach Sent: Friday, March 12, 2004 11:00 AM To: gcc-help@gcc.gnu.org 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. ------------------------------------------------------------------------ ----------------