Article View: gnu.gcc.help
Article #31Gcc 2.3.1 and collect2 library paths
From: Paul Tatarsky
Date: Tue, 03 Nov 1992 22:56
Date: Tue, 03 Nov 1992 22:56
32 lines
1857 bytes
1857 bytes
With gcc2.2.2 using g++ one did not have to tell g++ where libg++ was. Under gcc2.3.1 which I just installed it appears that g++ wants you to tell it where libg++ is with a -L. Is this true or did I screw up the install. I just built gcc the same way I have in the past on a decstation. Nothing fancy. From the final link of a trivial C++ program: g++ -v -o foo foo.C 2.2.2 /usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.2.2/ld -EL -o foo /usr/lib/crt0.o -L/usr/local/gnu/lib -L/usr/local/gnu/lib -L/usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.2.2 -L/usr/lib/cmplrs/cc -L/usr/lib/cmplrs/cc -L/usr/local/gnu/lib foo.o -lg++ -lgcc -lc -lgcc (Note the -L statements are correct for my installation) 2.3.1 /usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.3.1/ld -EL -o foo /usr/lib/crt0.o /usr/tmp/cca186051.o -lg++ /usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.3.1/libgcc.a -lc /usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.3.1/libgcc.a ld: Can't locate file for: -lg++ collect: /usr/bin/ld returned 1 exit status (Note the changed system of direct paths to libgcc and no -L/usr/local/gnu/lib) If I add a -L/usr/local/gnu/lib it all works fine, my question is how do I get back the older more convenient "autolink" if you will. Or, do I need to do something special with my install that I didn't have to do under gcc2.2.2? Paul Tatarsky email: paul@cse.ucsc.edu UC Santa Cruz CIS/CE Board Technical Staff
Technical Details
Message-ID:
<1d702iINNcg4@darkstar.UCSC.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!linus!agate!darkstar.UCSC.EDU!aztec!paulShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!linus!agate!darkstar.UCSC.EDU!aztec!paul From: paul@aztec.ucsc.edu (Paul Tatarsky) Newsgroups: gnu.gcc.help Subject: Gcc 2.3.1 and collect2 library paths Date: 3 Nov 1992 22:56:18 GMT Organization: UC Santa Cruz CIS/CE Lines: 32 Distribution: world Message-ID: <1d702iINNcg4@darkstar.UCSC.EDU> Reply-To: paul@terra.ucsc.edu NNTP-Posting-Host: aztec.ucsc.edu