🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50835

Re: Compiling Ident strings into executable

#50835
From: Vivek Khera
Date: Thu, 05 Aug 1993 20:50
21 lines
1832 bytes
>>>>> "CD" == Christopher Davey <chris@quay.ie> writes:

CD> We are using gcc to compile libraries on SunOs 4.1.3, with gcc 2.4.3.

[...]

CD> Unfortunatly, the linker realises that ??ver.o is not required to 
CD> produce the final executable, and does not link it in. Is there any

instead of putting ??ver.o in the library, explicitly link it on the
command line.  if it is in the .a library file, it is never linked
unless there is an external reference to something in it.  if a .o is
specified at the command line, it will be forced to be linked in.

i.e., use "gcc -o foo ver.o main.o libfoo.a"  instead of something
like "gcc -o foo main.o libfoo.a" where ver.o is in libfoo.a
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Gradual Student/Systems Guy  Department of Computer Science
Internet: khera@cs.duke.edu               Box 90129
          RIPEM/PGP/MIME spoken here      Durham, NC 27708-0129 (919)660-6528
Technical Details
Message-ID: <KHERA.93Aug5165058@thneed.cs.duke.edu>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!usc!elroy.jpl.nasa.gov!decwrl!concert!duke!khera
References: <5Aug.145854.15583@quay.ie>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,cbd55e0a714ac7fe
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-08-05 15:29:46 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!usc!elroy.jpl.nasa.gov!decwrl!concert!duke!khera
From: khera@cs.duke.edu (Vivek Khera)
Newsgroups: gnu.gcc.help
Subject: Re: Compiling Ident strings into executable
Message-ID: <KHERA.93Aug5165058@thneed.cs.duke.edu>
Date: 5 Aug 93 20:50:58 GMT
References: <5Aug.145854.15583@quay.ie>
Sender: news@duke.cs.duke.edu
Organization: Duke University CS Dept., Durham, NC
Lines: 21
Nntp-Posting-Host: thneed.cs.duke.edu
To: chris@quay.ie (Christopher Davey)
In-reply-to: chris@quay.ie's message of 5 Aug 93 14:58:54 GMT
X-Md4-Signature: 77614ba8ee15571dffe74ebe30180abf
X-Md5-Signature: 83a29d00ae0b6df8c32606ff0e6b1751