Why Qt Creator gives "No absolute path for library" Error for a known library?
Hi I am using an industrial machine vision camera (Basler) in a Qt based project. I work under linux Ubuntu 12.04 64 bit and Qt 4.8
I have set $LD_LIBRARY_PATH and all the required environment variables to find the camera libraries but Still Qt creator gives error when wants to run my application. it gives the following error:
"No absolute path for '/opt/GenICam_v2_3/bin/Linux64_x64/GenApi/Generic/libXMLLoader_gcc40_v2_3.so'"
it is amazing that when I run my Qt project from the Ubuntu terminal it runs without any problem but When I want to run it from the Qt creator it gives the above error message. why Qt creator fails to find the library path ?
This path is not a valid path in my machine and I don't have such a folder "/opt/GenICam_v2_3" in my machine, and I don't know why Qt insists on creating such folder.
I used the ldd command for my application and all the libraries was found So I'm sure that nothing is missing.
Is there anything else that I have forget to set before I could run it in Qt Creator ? Why such a phantom location is necessary for Qt Creator ?
I tried to put my libXMLLoader_gcc40_v2_3.so which is in another place to the above location but it gives another error message in Qt creator :
"Environment variable 'GENICAM_ROOT_V2_3' not found"
I have set this environment variable in /etc/bash.bashrc so I'm sure I've declared it but still Qt Creator cannot find it too.
Content of bash.bashrc
I copied all the above information to .bashrc in the home directory too.
What should I do to run my application in Qt creator because I need to debug my application and in Ubuntu terminal I cannot do such thing easily.
[edit: added missing coding tags @ SGaist]
where libXMLLoader_gcc40_v2_3.so from? In my case i'm copied library from Windows to Linux and have same problem=).
Hi and welcome to devnet,
After updating bashrc, did you source it ? Or logged out and in again ?
Thanks for your response. yes I logged out and rebooted the operating system so many times but nothing happened. this project could be run in Ubuntu terminal so it confirms that bashrc is okay.
try LIBS+=-L$$LOCATION_YOUR_LIB -lNameOfYourLib
Dear ningen I've done this and as I told you earlier the project compile successfully so it shows all the libraries are loaded.
My .pro file contains all the header and shared library information about my camera.
are you trying rm *.pro.user?
yes I tried that too .. :((
I think there might be an internal problem with the camera library !!
Since I've never seen something like that before !
but I don't know why it could be run in the Ubuntu terminal
Did you check the environment variables in the Run part of the Project panel ?
yes, the LD_LIBRARY_PATH is exactly the same as the value I've set in the bashrc file.
Is there any need to add other environment variables which I've set in the bashrc to the evironment variables of the Run part ?
because the first error is not concern with the unknown environment variables !
Do you have GENICAM_ROOT_V2_3 and friends in the list of known variables ?
IIRC, pylon needs them to work correctly