Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cant access external or system libraries

Cant access external or system libraries

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 4.3k 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
    saeed144
    wrote on last edited by
    #1

    Dear all,

    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.

    Any idea's?
    Thanks in advance,
    Saeed
    Qt 4.7.4, (Qt creator 2.4.1) on linux (Fedora 15)

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p-himik
      wrote on last edited by
      #2

      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.

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

        You're right,

        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,
        @-lrt
        @

        not
        @-lrt-2@

        Thanks,
        Saeed

        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