Develprog
asked on
Kdevelop and Opencv library's path linking problem, how specify path of libraries for compilation ?
Hi,
I have a the version 1.00 of Opencv I do a ./configure then a make to generate
the .la an the .so files.
I don't do the make install for making my programs independent of my system, the goal was
to put the .so and the .la files in a directory of my programs and not in the /usr/local/lib directory.
SO how can I specify into Kdevelop that when I do a compilation of my programs that the lining of library
was in a specify path and not in the /usr/local/lib ?
I must put the .la and .so files into my project directories for example /home/my_name/my_opencv_pr ogram/my_l ibraries?
I tried to change values of LDFLAGS like : "-L /home/my_name/my_opencv_pr ogram/my_l ibraries"
and after compilation I receive error message like there is no specify format file in this path.
How can I specify in Kdevelop a path for linking outside the system and to a specify directories?
Thank you
I have a the version 1.00 of Opencv I do a ./configure then a make to generate
the .la an the .so files.
I don't do the make install for making my programs independent of my system, the goal was
to put the .so and the .la files in a directory of my programs and not in the /usr/local/lib directory.
SO how can I specify into Kdevelop that when I do a compilation of my programs that the lining of library
was in a specify path and not in the /usr/local/lib ?
I must put the .la and .so files into my project directories for example /home/my_name/my_opencv_pr
I tried to change values of LDFLAGS like : "-L /home/my_name/my_opencv_pr
and after compilation I receive error message like there is no specify format file in this path.
How can I specify in Kdevelop a path for linking outside the system and to a specify directories?
Thank you
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thank you
>>select Options... with the RMB or hit the wrench icon
what is RMB ?
>>i.e if your lib is libsomelib.so, then you add it so: -lsomelib
I have more than one librairies, because Opencv has 4 libraries (libcv, libcvaux, libcxcore and libhighgui)
so must it be like this (-lcv, -lcvaux, lcxcore, -lhighgui ) ?
>>select Options... with the RMB or hit the wrench icon
what is RMB ?
>>i.e if your lib is libsomelib.so, then you add it so: -lsomelib
I have more than one librairies, because Opencv has 4 libraries (libcv, libcvaux, libcxcore and libhighgui)
so must it be like this (-lcv, -lcvaux, lcxcore, -lhighgui ) ?
RMB is "Right Mouse Button".
>so must it be like this (-lcv, -lcvaux, lcxcore, -lhighgui )
Yes. And if your library is not part of your system wide library path add -Lpath/to/the/library/you/ used
>so must it be like this (-lcv, -lcvaux, lcxcore, -lhighgui )
Yes. And if your library is not part of your system wide library path add -Lpath/to/the/library/you/
ASKER
Ok,
Thank you it is done with by adding library path without space to '-L'
Thank you it is done with by adding library path without space to '-L'
ASKER
More exactly I do that:
Projects => Projects Otpions => Configure Options :
LDFLAGS = -L /home/name/my_programs/pro
but the compoil error is :
/usr/bin/ld: /home/name/my_programs/pro
SO I want that when KDevelop compils it doesn't link to system bin but in a specifyed path, where in KDEvelop I can set this config ?
Thank you