From: Skye Newsgroups: comp.os.msdos.djgpp Subject: Re: Can't link non standard library. FAQ not enough. Date: Tue, 01 Apr 1997 10:40:32 -0800 Organization: Uniserve Message-ID: <334156A0.2FD@iname.com> References: <01bc3ec5$8456ed20$86e04cc3 AT 10 DOT 0 DOT 1 DOT 1 DOT inf> Reply-To: s_c AT geocities DOT com NNTP-Posting-Host: dy1-01.van.tvs.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Lines: 32 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Jordi Vida=F1a Caball=E9 wrote: > When trying > to link, ld says "no such file or directory (ENOENT)". I've written the= > library name > with suffix .a, without it, with and without the path before it's name = and = =2E....... Here's an example of what works for me (in c++): the lib is: libtest.h, libtest.cc gcc -c libtest.cc -o libtest.a [copy libtest.a file to djgpp\lib dir] the program is: prog.cc [includes libtest.h] gcc -c prog.cc -o prog.o gxx -o prog.exe prog.o -ltest [run prog.exe and it should work] Name your lib: "lib"[your name]".a" It works for me but I don't know why yet.? Eli? DJ? -SC