Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Using sfml-audio OSX and Qt  (Read 2520 times)

0 Members and 1 Guest are viewing this topic.

MaximumTrainer

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • MaximumTrainer
    • Email
[SOLVED] Using sfml-audio OSX and Qt
« on: November 04, 2014, 04:46:12 pm »
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 file
QT       += 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.
« Last Edit: November 05, 2014, 07:03:59 pm by MaximumTrainer »
Free Indoor Cycling Software - https://maximumtrainer.com

MaximumTrainer

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • MaximumTrainer
    • Email
Re: Using sfml-audio OSX and Qt
« Reply #1 on: November 04, 2014, 05:13:15 pm »
Nevermind I think I found it, I did uncompress the tar.gz with 7zip instead of the OSX unzipper, will post result.

Yes that was it, just had to unzip it on the host system and it's working now.
Thanks SFML!
« Last Edit: November 04, 2014, 06:17:17 pm by MaximumTrainer »
Free Indoor Cycling Software - https://maximumtrainer.com

 

anything