L
luca
Hi,
i have a problem with linking under linux. I have written a C++
library and
a C++ program that uses that library (i use Eclipse IDE under Mandriva
under Virtual Box..).
I succesfully compile the library, obtaining the file libfvlib.a (one
under the Debug directory,
the other under the Release directory).
After that, i have created a new C++ project that uses that library.
I have added the library path of the debug (release) version of
libfvlib.a for the debug (release) version
of the program. I have added the .a file with -l option (to be used in
the linking process).
My program compiles but does not link. I obtain this error:
**** Build of configuration Debug for project pmrplib ****
make all
Building target: pmrplib
Invoking: GCC C++ Linker
g++ -L/home/luca/Sviluppo/projects/pmrplib/fvlib/Debug -o"pmrplib" ./
cpmrplib.o ./cpmrp.o ./main.o -llibfvlib.a
/usr/bin/ld: cannot find -llibfvlib.a
collect2: ld returned 1 exit status
make: *** [pmrplib] Error 1
pmrplib is the program name. It must be created linking togheter the
following files:
cpmrplib.o cpmrp.o main.o libfvlib.a (plus all the default
libraries...).
But the linker (ld) cannot find the file libfvlib.a, even if it is
specified the path where to found it.
Help!
Luca
Ps.
I have tried to use -L/home/luca/Sviluppo/projects/pmrplib/fvlib/
Debug/ , that is, i have added the final / , but didn't work...
i have a problem with linking under linux. I have written a C++
library and
a C++ program that uses that library (i use Eclipse IDE under Mandriva
under Virtual Box..).
I succesfully compile the library, obtaining the file libfvlib.a (one
under the Debug directory,
the other under the Release directory).
After that, i have created a new C++ project that uses that library.
I have added the library path of the debug (release) version of
libfvlib.a for the debug (release) version
of the program. I have added the .a file with -l option (to be used in
the linking process).
My program compiles but does not link. I obtain this error:
**** Build of configuration Debug for project pmrplib ****
make all
Building target: pmrplib
Invoking: GCC C++ Linker
g++ -L/home/luca/Sviluppo/projects/pmrplib/fvlib/Debug -o"pmrplib" ./
cpmrplib.o ./cpmrp.o ./main.o -llibfvlib.a
/usr/bin/ld: cannot find -llibfvlib.a
collect2: ld returned 1 exit status
make: *** [pmrplib] Error 1
pmrplib is the program name. It must be created linking togheter the
following files:
cpmrplib.o cpmrp.o main.o libfvlib.a (plus all the default
libraries...).
But the linker (ld) cannot find the file libfvlib.a, even if it is
specified the path where to found it.
Help!
Luca
Ps.
I have tried to use -L/home/luca/Sviluppo/projects/pmrplib/fvlib/
Debug/ , that is, i have added the final / , but didn't work...