Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. application created by qt creator can not find shared library files in Gnome debian
Forum Updated to NodeBB v4.3 + New Features

application created by qt creator can not find shared library files in Gnome debian

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maidami0
    wrote on last edited by
    #1

    I m new to linux and Qt environment, I developed an application on Debian 32bit using Qt,Here is the About information:
    0_1492931576255_upload-f112962d-d8e8-448b-8371-d33674106fae
    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!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • M Offline
        M Offline
        maidami0
        wrote on last edited by maidami0
        #3

        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!

        jsulmJ 1 Reply Last reply
        0
        • M maidami0

          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!

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @maidami0 You should read http://doc.qt.io/qt-5/linux-deployment.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved