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

Author Topic: Audio library not found on Mac OSX!  (Read 4337 times)

0 Members and 1 Guest are viewing this topic.

declan

  • Newbie
  • *
  • Posts: 34
    • View Profile
Audio library not found on Mac OSX!
« on: July 28, 2010, 12:03:18 am »
Hey guys, I just want to play a simple .wave file. So I compiled my program, dance.cpp, with this:

Code: [Select]
mayer:dancingsteve declan$ make
g++ -Wall -c dance.cpp
g++ -Wall -o dance dance.o -framework sfml-audio -framework sfml-graphics -framework sfml-window -framework sfml-system


And it compiles fine. Then I run it, and even if all the audio stuff in the actual program is commented out, I get this error:

Code: [Select]
mayer:dancingsteve declan$ ./dance
dyld: Library not loaded: @executable_path/../Frameworks/sndfile.framework/Versions/A/sndfile
  Referenced from: /Library/Frameworks/sfml-audio.framework/Versions/A/sfml-audio
  Reason: image not found
Trace/BPT trap


Everything else (lots of graphical stuff) has worked fine so far. I followed the steps in the tutorial. What is the problem?

Thanks!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Audio library not found on Mac OSX!
« Reply #1 on: July 28, 2010, 01:56:24 am »
The OS is looking for sndfile, that is a dependency of the audio package. And even though you dropped the audio code, you're still linking against the audio package : "-framework sfml-audio" in your command line.

Now considering that you may indeed want to link against the audio package, you'd need to finish the SFML installation process. You actually missed one step :
Quote from: "http://www.sfml-dev.org/tutorials/1.6/start-osx.php"
Then go to the SFML-x.y/extlibs/bin directory. For the 32 bits version, copy the OpenAL.framework and libsndfile.framework directories to /Library/Frameworks. For the 64 bits version, only copy the contents of the x86_64 directory.
Want to play movies in your SFML application? Check out sfeMovie!

declan

  • Newbie
  • *
  • Posts: 34
    • View Profile
Audio library not found on Mac OSX!
« Reply #2 on: July 29, 2010, 04:42:08 pm »
Damn! I don't see how I missed that. It works now. Thanks!