delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/14/10:35:48

Date: Tue, 14 Jan 1997 17:12:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Benjamin Audy <baudy AT videotron DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Linking problem for me, too
In-Reply-To: <32da9f90.11450899@poste1>
Message-ID: <Pine.SUN.3.91.970114170921.13169E-100000@is>
MIME-Version: 1.0

On Mon, 13 Jan 1997, Benjamin Audy wrote:

> But when I create a "test.o" file and try to link the two together
> with "ld", it doesn't work.
> 
> First, I tried: "ld test.o func.o", but it gives me a list of
> undefined references, who are some standard library functions I call
> from test.cpp, (ie: malloc).

Don't call ld directly, it needs gobs of options and libraries in specific
order, and there's no reason for you to remember them.  Use gxx, even if
you only need to link: 

	gxx -o test.exe test.o func.o

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019