Hi everyone,

I've been doing some interesting thing in some personal projects with QT. I'm using the software in OSX and usually I compile the final versions against a static version of QT using a shell script that do this:

Qt Code:
  1. cd "project folder...";
  2. PATH=/Users/TCB13/(...)/qt-source/bin:$PATH; --> Path to my static QT.
  3. export PATH;
  4. qmake -config release;
  5. make;
  6. make clean;
To copy to clipboard, switch view to plain text mode 

And everything works fine in another machine with OSX without QT installed. The problem is that lately I've been playing with an external dynamic library I downloaded and and can get it working in the other computer.

I've included the dylib in my .pro file like this: (I've a copy of the dylib in the project folder)

Qt Code:
  1. #macx: LIBS += -L$$PWD/ -lwpsapi
  2.  
  3. #INCLUDEPATH += $$PWD/
  4. #DEPENDPATH += $$PWD/
To copy to clipboard, switch view to plain text mode 

And when I compile it "statically" and run it on the other computer I get:

Qt Code:
  1. dyld: Library not loaded: @executable_path/libwpsapi.dylib
  2. Referenced from: /Users/TCB13/Desktop/dude111
  3. Reason: image not found
  4. Trace/BPT trap: 5
To copy to clipboard, switch view to plain text mode 

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.

Thanks!