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. Compilation problem on Qt c++ on mac os x 10.8.5
Forum Updated to NodeBB v4.3 + New Features

Compilation problem on Qt c++ on mac os x 10.8.5

Scheduled Pinned Locked Moved General and Desktop
26 Posts 4 Posters 12.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.
  • S Offline
    S Offline
    studentvision
    wrote on last edited by
    #17

    Hello,

    I resolved the problem by put the library given in the SDK on the project folder. But, really I can not why when I configure it like:

    @DYLD_LIBRARY_PATH=/opt/local/bin@ it did not work and I get an error like @dyld: Symbol not found: __cg_jpeg_resync_to_restart
    Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
    Expected in: /opt/local/lib//libJPEG.dylib
    in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO@
    but when I copied the library form /opt/local/bin to the project folder, it work fine ??!! Any explication please ?

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

      @DYLD_LIBRARY_PATH=/opt/local/bin@

      you are pointing to the bin folder, the dylibs are in

      @DYLD_LIBRARY_PATH=/opt/local/lib@

      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
      0
      • S Offline
        S Offline
        studentvision
        wrote on last edited by
        #19

        Hello,

        Sorry, I made a mistake in my last post.

        In fact, I put@ DYLD_LIBRARY_PATH=/opt/local/lib@ but it does not work but when I copied the library form /opt/local/lib to the project folder, it work fine ??!! Any explication please ?

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

          Have a look at your application with otool -L you'll see what is linked.

          Then you also have the search order which is important

          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
          0
          • S Offline
            S Offline
            studentvision
            wrote on last edited by
            #21

            Hello,
            I run this command

            @otool -L main .o@
            but I did not get any output ?

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

              Not on main.o on the executable generated

              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
              0
              • S Offline
                S Offline
                studentvision
                wrote on last edited by
                #23

                Hello,

                I run @otool -L ListAllPrsilicaCameras@

                I get these output:
                @ListAllPrsilicaCameras:
                libPvAPI.dylib (compatibility version 0.0.0, current version 0.0.0)
                libPvJNI.dylib (compatibility version 0.0.0, current version 0.0.0)
                /opt/local/lib/libjpeg.9.dylib (compatibility version 11.0.0, current version 11.0.0)
                /Users/kifaraaouig/Qt/5.2.0/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.2.0, current version 5.2.0)
                /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
                /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)@
                I remark that the problem is in
                @libPvAPI.dylib@

                When i put @DYLD_LIBRARY_PATH=/opt/local/lib@

                I get the error mentioned earlier but when I changed it like:

                @DYLD_LIBRARY_PATH=the project folder@

                What is the problem ?

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

                  Hi, welcome to Mac's version of DLL hell :-)

                  I think it's because your app's otool -L references /opt/local/lib/libjpeg.9.dylib and otool -L on Apple's ImageIO.Framework (the one that gave the error message on Page 1) references /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib.

                  When you use the copied DLLs in your project's folder, I think the ImageIO.Framework loads Apple's libpjpeg.dylib and all is ok, but maybe in /opt/local/lib there's a symbolic link called libpjpeg.dylib, so in that case ImageIO.Framework thinks /opt/local/lib's libpjpeg.dylib is kosher to use (and hence the error, because it's not).

                  Make sense? Anyway I think you need a more complete understanding exactly what dlls/dylibs are loaded. You can try with the lsof utility like this (first start your app and then open Terminal and type lsof -c and the first few letters of your app):
                  lsof -c ListA

                  Or lsof -c ListA | sort
                  (in this case it's useful with a big Terminal window :-)

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    sandy.martel
                    wrote on last edited by
                    #25

                    To trace what shared libraries get loaded in which order see:

                    @man dyld@

                    more precisely the variable DYLD_PRINT_LIBRARIES

                    in short:

                    @export DYLD_PRINT_LIBRARIES=1
                    /path/to/your/app
                    @

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      studentvision
                      wrote on last edited by
                      #26

                      Hello,

                      At the end, it is impossible to fix that in the case of

                      @ DYLD_LIBRARY_PATH=/opt/local/lib@

                      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