delorie.com/archives/browse.cgi | search |
Path: | news.mv.net!news.shore.net!newsfeed.mathworks.com!newsfeed.direct.ca!look.ca!feedwest.news.agis.net!agis!news.interworld.net!not-for-mail |
From: | Nate Eldredge <neldredge AT hmc DOT edu> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: How can ld be used stand alone? |
Date: | 04 Sep 2000 17:09:18 -0700 |
Organization: | InterWorld Communications |
Lines: | 26 |
Sender: | nate AT mercury DOT st DOT hmc DOT edu |
Message-ID: | <83pumjwvgx.fsf@mercury.st.hmc.edu> |
References: | <8p1a77$sr5$1 AT supernews DOT com> |
NNTP-Posting-Host: | mercury.st.hmc.edu |
Mime-Version: | 1.0 |
X-Trace: | nntp1.interworld.net 968112559 87151 134.173.57.219 (5 Sep 2000 00:09:19 GMT) |
X-Complaints-To: | usenet AT news DOT interworld DOT net |
NNTP-Posting-Date: | Tue, 5 Sep 2000 00:09:19 +0000 (UTC) |
User-Agent: | Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 |
Xref: | news.mv.net comp.os.msdos.djgpp:103169 |
"Hax" <hax AT no-junk-please DOT haxware DOT co DOT uk> writes: > Can anyone out there tell me how I might use ld as a stand alone linker - > i.e. not use gcc as the linker. If I understand correctly, gcc simply calls > ld with the correct command-line options. > > For example, if I had two files main.c and process.c and process.c made a > call to printf, after compiling with gcc, using the -c flag, what would I > need to include in the linker script. I've had a go at this, and assume > that I need to include libc.a, but when using the command line: > > ld -o test.exe -Lt:\djgpp\lib -lt:\djgpp\lib\libc.a main.o process.o > > I get the error message: > > T:/DJGPP/BIN/ld.exe: cannot find -lt:\djgpp\lib\libc.a -l requires merely part of a filename. Given -lFOO, it will link libFOO.a from wherever it's found in the search path. Hence you want -Lt:\djgpp\lib -lc -- Nate Eldredge neldredge AT hmc DOT edu
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |