Important: Please read the Qt Code of Conduct -

[solved]A freshman need you help on how to help Qt find the library when run a program.

  • Basic software Information:
    Mac OS X 10.9.1
    Qt Creator 3.0.1
    Based on Qt 5.2.1 (Clang 5.0 (Apple), 64 bit)
    Built on Jan 31 2014 at 06:00:56

    I've installed xcode 5.0.2 and command line tool. Then I installed Qt 5.2.1 for Mac (378 MB).

    Now, I open Qt creator and create a default Qt Widgets Application. When I run it without modifying anything, I receive the message
    "dyld: Library not loaded: /work/build/PADDING/lib/QtWidgets.framework/Versions/5/QtWidgets"
    Actually I find that the path should be "/users/myname/Qt5.2.1/5.2.1/lib/QtWidgets.framework/Versions/5/Qtwidgets".

    Could you please tell me how I can tell my laptop to find the Qtwidgets on the right path?

  • /work/build/... hmm that is the original path in Qt's installer, but it should be replaced by the installation path you specified, i.e. /users/myname/Qt5.2.1/5.2.1.

    Maybe the installation didn't finish properly? Anyway, you can check the app you built, that it points to the correct QtWidgets path, by running otool -L on the executable file (in terminal, go to the app's Contents, MacOS, it's in there)

  • What you've said is right. It just didn't finish properly. I've change the install directory to / . And this time it works well. 3q

Log in to reply