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. simple linking to .dylib: how?

simple linking to .dylib: how?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 419 Views 2 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.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by davecotter
    #1

    in my .pro file i have this:

    DIR_BOOST		= $${DIR_EXTERNAL}boost_1_68_0/
    DIR_BOOST_LIBS		= $${DIR_BOOST}stage/lib/
    DYLD_LIBRARY_PATH	+= $${DIR_BOOST_LIBS}
    
    LIB_BOOST_THREAD	= libboost_thread
    LIBS += -l$${LIB_BOOST_THREAD}
    

    yet at compile time i get this:

    ld: library not found for -llibboost_thread
    

    i started with:

    LIBS += -L$${DIR_BOOST_LIBS} -l$${LIB_BOOST_THREAD}
    

    but that also fails.

    i have confirmed that the path is definitely correct, and the file "libboost_thread.dylib" definitely exists there and is compiled correctly

    the linker is sent this command:

    -L../../../External/boost_1_68_0/stage/lib/ -llibboost_thread
    

    is it that the path must be absolute (not relative) ?

    what am I missing?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davecotter
      wrote on last edited by
      #3

      oh! huh. that's not the name used in the file system, which is why i was (am?) confused. thanks, that worked!

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

        Hi,

        It's -lboost_thread like on Linux.

        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
        3
        • D Offline
          D Offline
          davecotter
          wrote on last edited by
          #3

          oh! huh. that's not the name used in the file system, which is why i was (am?) confused. thanks, that worked!

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

            On *nix systems, you drop the lib prefix when linking to a library. Like for example libz -> it's -lz.

            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
            3

            • Login

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