delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/11/19/17:28:31

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <00c501c3aeec$60fcf010$5929120b@T21jSANCHEZ2>
From: "J. L." <jlsgarrido AT yahoo DOT com>
To: <djgpp AT delorie DOT com>
References: <3fbb8c90$0$11887$9b4e6d93 AT newsread2 DOT arcor-online DOT net>
Subject: Re: GCC Lib Search Path
Date: Wed, 19 Nov 2003 16:27:51 -0600
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Reply-To: djgpp AT delorie DOT com

Wolfgang Schlegel <wolfgang DOT schlegel AT arcor DOT de> tuvo a bien
escribir:

Sorry to all NG and mail-list. I send two post related to this,
but I never see. An apology for the nuisances :-)

>      Hi newsgroup,
>
> a problem I can't solve deals with gcc's lib search path. I try
> the command line
>
>      gcc test.cpp -o test.exe libm.a
>
> and get
>
>     gcc.exe: libm.a: No such file or directory (ENOENT)
>
> The lib exists in c:\djgpp\lib, and if I explicitly type
>
>     gcc test.cpp  -o test.exe c:\djgpp\lib\libm.a

If I understand correctly, you are trying to link the mat library,
right?

>
> it works fine. Options -l and -L don't yield any result too.
> From the FAQ I believe to know gcc.exe uses an environment
> variable called LIBRARY_PATH. I set this to the appropiate
> directory, but gcc didn't  find it's libs. I read about the
> syntax for djgpp.env, had a look on this file, was surprised to
> see all directory names there seem to be converted to UNIX ( \
> to / ), tried to avoid this conversion, and gcc.exe again
> didn't find it's libs. For the moment I'm out of ideas. Thank
> you for aid,
>
>     Wolfgang

Because you need invoke with option -l ('ell', not 1) in the
following form:

gcc test.cpp  -o test.exe -lm

i.e, you omit the 'lib' prefix, and the part '.a' of the name of
library.

You can see the documents in the 'DJGPP User's Guide'. You can
reach at:

http://www.delorie.com/djgpp/doc/ug/

For your current trouble, take a look to 'GCC invocation'

Regards

Jose L. Sanchez Garrido
'I don't know' -Isaac Asimov


- Raw text -


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