Имеется проект.
C++ (Qt)
TEMPLATE = subdirs
SUBDIRS += \
AA \
AE \
AP \
APP/myapp
AA, AE, AP это все библиотеки однотипно созданные.
C++ (Qt)
QT += network sql xml widgets script
QT -= gui
TARGET = AE
TEMPLATE = lib
INCLUDEPATH += $$PWD/../AP
FORMS += \
...
SOURCES += \
...
HEADERS += \
...
C++ (Qt)
#-------------------------------------------------
#
# Project created by QtCreator 2013-03-16T16:54:48
#
#-------------------------------------------------
cache();
QT += core gui network xml printsupport uitools script scripttools webkit webkitwidgets
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Alaud
include(version.pri)
win32 {
RC_FILE += rc_info.rc
OTHER_FILES += rc_info.rc
}
TEMPLATE = app
HEADERS += \
mainwindow.h \
developertools.h \
workspace.h \
about.h \
fastsearch.h \
alaudconnectionmanger.h
SOURCES += \
mainwindow.cpp \
main.cpp \
developertools.cpp \
workspace.cpp \
about.cpp \
fastsearch.cpp \
alaudconnectionmanger.cpp
FORMS += \
mainwindow.ui \
developertools.ui \
workspace.ui \
about.ui \
fastsearch.ui \
alaudconnectionmanger.ui
RESOURCES += \
icons.qrc \
macx:{
ICON = alaud.icns
VERSION = NVER1.NVER2.NVER3
}
# копирование библиотек в бандл для мака
#DEPLOYLIB = $$OUT_PWD/../../AE/libAE.dylib $$OUT_PWD/../../AE/libAE.1.dylib $$OUT_PWD/../../AE/libAE.1.0.dylib $$OUT_PWD/../../AE/libAE.1.0.0.dylib
#DEPLOYLIB += $$OUT_PWD/../../AP/libAP.dylib $$OUT_PWD/../../AP/libAP.1.dylib $$OUT_PWD/../../AP/libAP.1.0.dylib $$OUT_PWD/../../AP/libAP.1.0.0.dylib
#DEPLOYLIB += $$OUT_PWD/../../OpenRPT/lib/libopenrpt.dylib $$OUT_PWD/../../OpenRPT/lib/libopenrpt.1.dylib $$OUT_PWD/../../OpenRPT/lib/libopenrpt.1.0.dylib $$OUT_PWD/../../OpenRPT/lib/libopenrpt.1.0.0.dylib
#DEPLOYLIB += $$OUT_PWD/../../OpenRPT/lib/libcommon.dylib $$OUT_PWD/../../OpenRPT/lib/libcommon.1.dylib $$OUT_PWD/../../OpenRPT/lib/libcommon.1.0.dylib $$OUT_PWD/../../OpenRPT/lib/libcommon.1.0.0.dylib
#DEPLOYLIB += $$OUT_PWD/../../OpenRPT/lib/libDmtx_Library.dylib $$OUT_PWD/../../OpenRPT/lib/libDmtx_Library.1.dylib $$OUT_PWD/../../OpenRPT/lib/libDmtx_Library.1.0.dylib $$OUT_PWD/../../OpenRPT/lib/libDmtx_Library.1.0.0.dylib
#DEPLOYLIB += $$OUT_PWD/../../OpenRPT/lib/libMetaSQL.dylib $$OUT_PWD/../../OpenRPT/lib/libMetaSQL.1.dylib $$OUT_PWD/../../OpenRPT/lib/libMetaSQL.1.0.dylib $$OUT_PWD/../../OpenRPT/lib/libMetaSQL.1.0.0.dylib
#DEPLOYLIB += $$OUT_PWD/../../OpenRPT/lib/librenderer.dylib $$OUT_PWD/../../OpenRPT/lib/librenderer.1.dylib $$OUT_PWD/../../OpenRPT/lib/librenderer.1.0.dylib $$OUT_PWD/../../OpenRPT/lib/librenderer.1.0.0.dylib
#DEPLOYLIB += $$OUT_PWD/../../OpenRPT/lib/libwrtembed.dylib $$OUT_PWD/../../OpenRPT/lib/libwrtembed.1.dylib $$OUT_PWD/../../OpenRPT/lib/libwrtembed.1.0.dylib $$OUT_PWD/../../OpenRPT/lib/libwrtembed.1.0.0.dylib
#ALAUDENGINE.files = $$DEPLOYLIB
#ALAUDENGINE.path = Contents/lib
#QMAKE_BUNDLE_DATA += ALAUDENGINE
# подключаем библиотеку АЕ----------------------------------------------------------------------------------
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../AE/release/ -lAE
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../AE/debug/ -lAE
else:macx: LIBS += -L$$OUT_PWD/../../AE/ -lAE
INCLUDEPATH += $$PWD/../../AE
DEPENDPATH += $$PWD/../../AE
win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../AE/release/libAE.a
else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../AE/debug/libAE.a
# подключаем библиотеку АP----------------------------------------------------------------------------------
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../AP/release/ -lAP
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../AP/debug/ -lAP
else:macx: LIBS += -L$$OUT_PWD/../../AP/ -lAP
INCLUDEPATH += $$PWD/../../AP
DEPENDPATH += $$PWD/../../AP
win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../AP/release/libAP.a
else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../AP/debug/libAP.a
# подключаем библиотеку Генератор и дизайнер отчетов----------------------------------------------------------------------------------
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../OpenRPT/lib/ -lopenrpt
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../OpenRPT/lib/ -lopenrpt
else:unix: LIBS += -L$$OUT_PWD/../../OpenRPT/lib/ -lopenrpt
INCLUDEPATH += $$PWD/../../OpenRPT/OpenRPT/writer
DEPENDPATH += $$PWD/../../OpenRPT/OpenRPT/writer
win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../OpenRPT/lib/libopenrpt.a
else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../OpenRPT/lib/libopenrpt.a
проблема в том что при сборке по отдельности в Qt Creator-е собираются все проекты. Но при запуске APP/myapp выдается следующее
dyld: Library not loaded: libAE.1.dylib
Referenced from: .../myapp/build/Debug/myapp.app/Contents/MacOS/myapp
Reason: image not found
Устанавливал Qt 5.2.0... без успешно, до 5.2.0 эта проблема залечилась при помощи костыля otool, install_name_tool и то она решение было временным и очень неудобным, приходилось постоянно редактировать pro файл при изменении библиотек.
кто сталкивался с подобной бедой? С какой стороны подходить к проблеме?