adviner
adviner

Reputation: 3567

QT Mac specify which dylib version to use

I built crypto++ and it creates the following:

libcryptopp.1.0.0.dylib libcryptopp.1.0.dylib (Alias) libcryptopp.1.dylib (Alias) libcryptopp.dylib (Alias)

I run the otool:

otool -L CryptoTest CryptoTest: libcryptopp.1.dylib (compatibility version 1.0.0, current version 1.0.0)

This is a console QT app.

It wants to use the libcryptopp.1.dylib which is just an Alias to libcryptopp.1.0.0.dylib

How do I specify so that it uses libcryptopp.1.0.0.dylib that why i dont have to either put two files or rename libcryptopp.1.0.0.dylib to libcryptopp.1.dylib

I tried in the .pro file

QMAKE_POST_LINK += install_name_tool -change /Users/adviner/Qt5.2.1/5.2.1/clang_64/lib/libcryptopp.1.0.0.dylib $$[QT_INSTALL_LIBS]/libcryptopp.1.0.0.dylib $(TARGET)

But for some reason its not working so I'm not sure if im using it correctly.

Update #1

The error I get:

./CryptoTest dyld: Library not loaded: libcryptopp.1.dylib Referenced from: /Users/myname/Projects/Test/build/./CryptoTest Reason: image not found

Any ideas?

Upvotes: 0

Views: 365

Answers (1)

adviner
adviner

Reputation: 3567

The solution i came up with is just to put the libs in the usr/local/lib folder and that works

Upvotes: 0

Related Questions