Mail Archives: djgpp/1997/04/01/15:44:56
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
- Raw text -