SFML community forums

Help => Audio => Topic started by: esotericsean on January 30, 2011, 10:43:58 pm

Title: Having trouble getting sf::Music working in Xcode
Post by: esotericsean on January 30, 2011, 10:43:58 pm
I've been working on a game in Code::Blocks on my PC, and now I'm learning how to build games in Xcode on a Mac.

Here's what my code looks like. (http://d.pr/mgHX)

So far, I've gotten everything working except for Music. I can include SFML/Audio.hpp, but as soon as I call sf::Music, I get errors. Does Xcode need some sort of linker or configuration to get this working?
Title: Having trouble getting sf::Music working in Xcode
Post by: Laurent on January 30, 2011, 10:52:00 pm
Do you link to the sfml-audio library?
Title: Having trouble getting sf::Music working in Xcode
Post by: esotericsean on January 30, 2011, 10:55:53 pm
I'm pretty new to Xcode, so I'm not quite sure how to link it.

It's great how fast you guys are at responding in this forum. I really appreciate it and recommend SFML to everyone now. :)
Title: Having trouble getting sf::Music working in Xcode
Post by: esotericsean on January 30, 2011, 11:09:38 pm
Okay, I actually figured out how to add the framework (easier than anticipated). But it's not loading it properly (http://d.pr/T7hW), I think.
Title: Having trouble getting sf::Music working in Xcode
Post by: Ceylo on January 31, 2011, 02:38:40 am
Looks like you didn't copy the sndfile framework in /Library/Frameworks.
Title: Having trouble getting sf::Music working in Xcode
Post by: esotericsean on January 31, 2011, 03:29:40 am
Quote from: "Ceylo"
Looks like you didn't copy the sndfile framework in /Library/Frameworks.


Okay, I did that. Still getting errors. (http://d.pr/33ao)

Sorry guys, maybe it's my fault. I'm pretty sure SFML is installed correctly now (I went through everything), but I'll try reinstalling just in case.
Title: Having trouble getting sf::Music working in Xcode
Post by: Ceylo on January 31, 2011, 11:45:21 am
You're still not linking your app against the sfml-audio framework.
Title: Having trouble getting sf::Music working in Xcode
Post by: esotericsean on January 31, 2011, 05:26:33 pm
Quote from: "Ceylo"
You're still not linking your app against the sfml-audio framework.


Ohh, now I understand. It wouldn't let me copy it before, so I had to do it manually. Finally works! Thanks so much :)