Unsolved application created by qt creator can not find shared library files in Gnome debian
-
I m new to linux and Qt environment, I developed an application on Debian 32bit using Qt,Here is the About information:
The app needs some shared library files,in a path,say, /path/to/my/shared/library/files ,so I export it in the /etc/profile.40 LD_LIBRARY_PATH= /path/to/my/shared/library/files 41 export LD_LIBRARY_PATH
The question are:
-
when debugging, The app just ignore LD_LIBRARY_PATH,and it can not find those .so files , then I added that variable in projects->build&run->run->run environment,and works fine,but why the app can't get that variable in /etc/profile?
-
I deployed the app in another place on the same computer, when running by clicking the executable file , the app can not find those .so files again. I added that LD_LIBRARY_PATH variable in projects->build&run->build->build environment, but it changes nothing. I use Gnome desktop environment on Debian 7.8 32 bit.If I run the app in terminal like "./app" it just works well !! I don't know, if there is some deference between the two ways of running an app on Debian? I have tried to add /path/to/my/shared/library/files to /etc/ld.so.conf followed by the command "ldconfig" ,but no help.
anyone know something about this ? thanks!
-
-
Hi and welcome to devnet,
Doing an export on the command line won't update anything in Qt Creator unless you start Qt Creator from that command line. As for modifying your ls.so.conf, again, that won't have any effect on Qt Creator until restarted. Note that when you configure a project with Qt Creator, a project_name.pro.user file is created with the settings you made in Qt Creator which also include the environment at that time thus you can also close the project (or Qt Creator), nuke that file and re-configure the project to take into account your system modifications.
-
thanks!
Now I understand that why qt creator can not get LD_LIBRARY_PATH, but I still don't know how to let the app find those .so files in the path /path/to/my/shared/files. whatever I do, when running the app by double clicking the executable file, it just cant find .so files.Please help me,thanks very much! -
@maidami0 You should read http://doc.qt.io/qt-5/linux-deployment.html