Cant access external or system libraries
I've been trying to add an external library to the project, but only been successful when the library.a file is in my build tree.
I can't add system library either. like /lib/librt.so.1 ;
For adding, I follow:
Side panel > Projects > add library > External library > ...
for the system library I follow:
Side panel > Projects > add library > system library > ...
I also tried to add /lib to my Projects > Build Settings > Build environment > LD_LIBRARY_PATH
and added :/lib , but didn't help.
Although the file is there, the command "exists" in project.pro file return as not found.
Thanks in advance,
Qt 4.7.4, (Qt creator 2.4.1) on linux (Fedora 15)
The command "exists" just checks for existence of file. It does not know anything about libraries or standard paths.
Why do you need this command in your .pro file? Your way to add a library to your project just adds some string to LIBS variable. If this library doesn't exists the linker will return an error so you don't have to check for existence of that library.
This "exist" command, not only helped, but made me believe that I can't access my libraries.
All works now :D
by the way, for the error like
@/usr/bin/ld: note: 'clock_gettime@@GLIBC_2.2' is defined in DSO /lib/librt.so.1 so try adding it to the linker command line@
one must include in the project.pro this line,