From: Martin DOT Stromberg AT lu DOT erisoft DOT se (Martin Stromberg) Newsgroups: comp.os.msdos.djgpp Subject: Re: Troubles linking into a library Date: 25 Aug 1999 15:06:12 GMT Organization: Ericsson Erisoft AB, Sweden Message-ID: <7q10p4$rr8$1@antares.lu.erisoft.se> References: <7q0a36$10c0$1 AT news DOT net DOT uni-c DOT dk> <7q0o93$ne5$1 AT antares DOT lu DOT erisoft DOT se> <7q0sim$12iu$1 AT news DOT net DOT uni-c DOT dk> NNTP-Posting-Host: spica-144.lu.erisoft.se X-Newsreader: TIN [version 1.2 PL2] Lines: 23 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Troelz Denver (c938133 AT student DOT dtu DOT dk) wrote: : Thanx for your quick responce. : Adding "-L." to the command doesn't have any effect. gcc have no problems : finding the file. If I use "ar -crus libfileout.a file1 file2 file3; gcc : file.c -lfileout.a", I get the response: "c:/djgpp/bin\ld.exe: cannot : open -lfileout.a: No such file or directory (ENOENT)". : I've tried other combinations "-llibfileout.a", "-libfileout.a", etc, but it : can't find the file, unless I use "libfileout.a". And then it can't find the : index. Back to problem 1. Try "gcc -v file.c -L. -lfileout". If that doesn't work, post the output from that commmand. FYI, "gcc ... -lfoo" will become "gcc ... libfoo.a" IIRC, so "-llibfileout.a" or "-libfileout.a" is certainly _not_ what you want. Right, MartinS