www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/17/02:55:48

Message-ID: <D1DE20405ECBD011B2AC0060974BC6EA02AA1F@DBSERVER>
From: "EFT.Eric Devolder" <eric DOT devolder AT eft DOT be>
To: FaehnTim AT aol DOT com, djgpp newsgroup <djgpp AT delorie DOT com>
Subject: RE: How/Where new libraries?
Date: Wed, 17 Jun 1998 08:55:25 +0200
MIME-Version: 1.0


> ----------
> From: 	FaehnTim AT aol DOT com[SMTP:FaehnTim AT aol DOT com]
> Sent: 	mercredi 17 juin 1998 8:41
> To: 	EFT.Eric Devolder
> Subject: 	How/Where new libraries?
> 
> In which directory do I put a new library?
> For example:
> I have libbcd.a and I put it into the c:\djgpp\lib directory and
> compile the
> code using (with #include "bcd.h" as line 1):
> 
> gxx -g -o cdtest cdtest.cc -lbcd
> The error is:
> cdtest.cc:1: bcd.h: No such file or directory (ENOENT)
> 
> -or- I use:
> 
> gxx -g -o cdtest cdtest.cc libbcd.a
> The error is:
> gcc.exe: libbcd.a: No such file or directory (ENOENT)
> cdtest.cc:1: bcd.h: No such file or directory (ENOENT)
> 
> Is there something else I need to do to make this work?  Do I need to
> put
> libbcd.a in a different directory? Do I need a different command line?
> I'm
> not sure what to do.
> 
> Thank you,
> Tim Faehnle
> 
Two possibilities:
a) if your library is in the same directory than your executable, simply
add -L./ in your command line (to indicate that gcc has to seek for
libraries in this path), and add -lbcd.
b) you can still work with -lbcd alone, if you copy your libbcd.a file
to %DJGPP%\lib directory, or if you modify your DJGPP.ENV file, by
adding the path to your library.

Eric Devolder

- Raw text -


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