Hi there,
I'm using Qt 5.3.1 and i'm trying to use use sfml-audio on OSX (10.9). I can compile the code fine but at execution, i'm having problem using the .dylib and get a strange message (see bottom of post)
I was able to successfully build ans use sfml-audio with the windows version (qt 5.3.1 and msvc2012).
I'm kind of new on OSX, I used the nice tutorial made to install SFML on OSX, everything went good. If you have any clue why it doesn't accept the .dylib at runtime on OSX, would be appreciated to share!
Here is the windows .pro fileQT += core gui widgets webkit webkitwidgets
QT -= sql
#CONFIG += console
TARGET = MaximumTrainer
TEMPLATE = app
CONFIG += qwt qt thread
RC_FILE = myapp.rc
# For Release, disable QDebug for performance
#DEFINES += QT_NO_DEBUG_OUTPUT
#src files for qwt
INCLUDEPATH += C:/Dropbox/qwt-6.1.0/src
#SFML
INCLUDEPATH += C:/Dropbox/SFML-2.1-windows-vc11-32bits/include
LIBS += C:/Dropbox/SFML-2.1-windows-vc11-32bits/lib/sfml-audio.lib
Here is the OSX .pro file:QT += core gui widgets webkit webkitwidgets
QT -= sql
TARGET = MaximumTrainer
TEMPLATE = app
CONFIG += release
CONFIG += qt thread
CONFIG += c++11
CONFIG += x86_64
CONFIG -= i386
#src files for qwt
INCLUDEPATH += /Users/tourlou2/Dropbox/qwt-6.1.0/src
macx {
QMAKE_MAC_SDK = macosx10.9
}
LIBS += /Users/tourlou2/Dropbox/SFML-2.1-osx-clang-universal/lib/libsfml-audio.2.1.dylib
LIBS += /Users/tourlou2/Dropbox/SFML-2.1-osx-clang-universal/lib/libsfml-system.2.1.dylib
INCLUDEPATH += /Users/tourlou2/Dropbox/SFML-2.1-osx-clang-universal/include
QMake step:
Starting: "/Users/tourlou2/Qt5.3.1/5.3/clang_64/bin/qmake" /Users/tourlou2/Dropbox/PowerVelo2_mac3/PowerVelo2.pro -r -spec macx-clang CONFIG+=x86_64
When I try to run the project inside QtCreator:
Starting /Users/tourlou2/Dropbox/build-PowerVelo2-Desktop_Qt_5_3_clang_64bit-Release/MaximumTrainer.app/Contents/MacOS/MaximumTrainer...
dyld: Library not loaded: @executable_path/../Frameworks/libsfml-audio.2.dylib
Referenced from: /Users/tourlou2/Dropbox/build-PowerVelo2-Desktop_Qt_5_3_clang_64bit-Release/MaximumTrainer.app/Contents/MacOS/MaximumTrainer
Reason: no suitable image found. Did find:
/Users/tourlou2/Dropbox/build-PowerVelo2-Desktop_Qt_5_3_clang_64bit-Release/MaximumTrainer.app/Contents/MacOS/../Frameworks/libsfml-audio.2.dylib: file too short
/Users/tourlou2/Dropbox/build-PowerVelo2-Desktop_Qt_5_3_clang_64bit-Release/MaximumTrainer.app/Contents/MacOS/../Frameworks/libsfml-audio.2.dylib: file too short
/usr/local/lib/libsfml-audio.2.dylib: file too short
The program has unexpectedly finished.