Hello. I have created a mac plugin, which is basically a dylib file. The plugin includes a couple of boost libraries, and no qt libs. Now I am trying to deploy it and, understandably, receive a dependancy error:
Get the following error in the Log.txt:
dlerror:dlopen(/Users/igorland/X-Plane 10/Resources/plugins/MyPlugin/mac.xpl, 6): Library not loaded: /usr/local/lib/libboost_system.dylib
Referenced from: /Users/igorland/X-Plane 10/Resources/plugins/MyPlugin/mac.xpl
Reason: image not found
So, I try to link the boost_system library.
First like this:
LIBS += \
-L/usr/local/Cellar/boost/1.55.0_2/lib \
-lboost_system
Then like this:
LIBS += \
-L/usr/local/Cellar/boost/1.55.0_2/lib/libboost_system.a
Then, I select the project file and add an external library through the menu, which adds the following:
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib/release/ -lboost_system
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib/debug/ -lboost_system
else:unix: LIBS += -L$$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib/ -lboost_system
INCLUDEPATH += $$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib
DEPENDPATH += $$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib/release/libboost_system.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib/debug/libboost_system.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib/release/boost_system.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib/debug/boost_system.lib
else:unix: PRE_TARGETDEPS += $$PWD/../../../../../../usr/local/Cellar/boost/1.55.0_2/lib/libboost_system.a
In all cases, I still have the same issue with the file.
When I did my first Qt application on Mac, I had to use the Qt Mac Deployment Tool to link the libraries. However, my understanding is that since it is not an app bundle but a dll, sorry dylib, I cannot do it. What is the proper way to link statically libraries in a dylib (this and a couple of others like libc++.)
Thanks a lot in advance.
↧