I ve been doing some funny stuff in personal projects with Qt. I m not an expert in this so if it s a dumb question (guess not I couldn t find anything useful) feel free to kill me.
不管怎么说,在OSX的Im,通常我用该指挥部的手稿汇编最后版本的Qt静态版本:
cd "project folder...";
PATH=/Users/TCB13/(...)/qt-source/bin:$PATH; --> Path to my static QT.
export PATH;
qmake -config release;
make;
make clean;
So far if I move the compiled binary to another computer without Qt installed everything works just fine! ;)
Yesterday I start to play around with a dynamic library provided by a company and I ve included the dylib in my .pro file like this: (I ve a copy of the dylib in the project folder)
#macx: LIBS += -L$$PWD/ -lwpsapi
#INCLUDEPATH += $$PWD/
#DEPENDPATH += $$PWD/
当我编集“法定”(使用上述指挥)并在其他计算机操作时,我会:
dyld: Library not loaded: @executable_path/libwpsapi.dylib
Referenced from: /Users/TCB13/Desktop/dude111
Reason: image not found
Trace/BPT trap: 5
I noticed that the size of my compiled binary is the same with or without including the dylib so, I googled how to include and external lib and some people are saying that I need to add "CONFIG += static" to my .pro file. I did it and the size of the file increased but I still got the same error.
希望能帮助我。