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. Uic can't find shared library
Forum Updated to NodeBB v4.3 + New Features

Uic can't find shared library

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 6.2k 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.
  • S Offline
    S Offline
    stiopa
    wrote on last edited by
    #1

    I am trying to make a Qt5 part of my source tree, so I haven't installed it on my machine, just copied it from source control. I am having a problem when I try to run uic.exe:

    stiopa@stiopa-VirtualBox:~/ct/LinuxLibs/Qt/bin > ./uic
    ./uic: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory

    I am still getting the same error even when I copy the libQt5Core library to bin directory. How is uic looking for shared libraries? Is there any environment variable I need to set to fix it?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jafarabadi.qt
      wrote on last edited by
      #2

      Hi stiopa
      Do you want to have a stand-alone executable file?
      if it's true...
      i think that just with Qt Enterprise you can get it
      in other case
      you should keep library files in executable file path.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stiopa
        wrote on last edited by
        #3

        hi a.jafarabadi,
        I'm not sure if I understand what you mean by stand-alone executable?

        I've got ~/ct/LinuxLibs/Qt/lib in my PATH variable, but this doesn't seem to help. I was wondering if the path to lib file isn't stored in some config file and since I have copied the qt install now points to an incorrect directory?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jafarabadi.qt
          wrote on last edited by
          #4

          stand-alone mean that you have a single excusable file for app without libs.
          i am trying for it's solution ;)

          1 Reply Last reply
          0
          • hskoglundH Offline
            hskoglundH Offline
            hskoglund
            wrote on last edited by
            #5

            Hi, uic (and the other Qt executable files in the bin directory) are built to look for Qt DLLs like libQt5Core.so.5 in ./../lib, so if uic is in ~/ct/LinuxLibs/Qt/bin and libQt5Core.so.5 is in ~/ct/LinuxLibs/Qt/lib it should work fine.

            One possibility is that when you copied the DLLs you lost the symlinks, because if you look for the DLLs that uic wants:
            ldd uic
            you'll see that it wants libQt5Core.so.5, but the DLL in the lib directory is really called libQt5Core.so.5.3.1. When you install Qt it will make a symbolic link file in the lib directory "libQtCore.so.5 -> libQt5Core.so.5.3.1", perhaps it became a roadkill when you copied Qt?

            Another solution is to use Windows type of installing by placing the DLLs together with the exe files, but that won't work without rewiring the uic exe file using the chrpath command, so that it looks for Qt DLLs in the same directory as itself. I've more about chrpath "here ":http://www.tripleboot.org/?p=138#Linux

            1 Reply Last reply
            0
            • S Offline
              S Offline
              stiopa
              wrote on last edited by
              #6

              Thanks for the replies.
              export LD_LIBRARY_PATH=~/ct/LinuxLibs/Qt/lib fixed it.

              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