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

Author Topic: Having trouble getting sf::Music working in Xcode  (Read 2675 times)

0 Members and 1 Guest are viewing this topic.

esotericsean

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://seanduran.com
Having trouble getting sf::Music working in Xcode
« 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.

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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Having trouble getting sf::Music working in Xcode
« Reply #1 on: January 30, 2011, 10:52:00 pm »
Do you link to the sfml-audio library?
Laurent Gomila - SFML developer

esotericsean

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://seanduran.com
Having trouble getting sf::Music working in Xcode
« Reply #2 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. :)

esotericsean

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://seanduran.com
Having trouble getting sf::Music working in Xcode
« Reply #3 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, I think.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Having trouble getting sf::Music working in Xcode
« Reply #4 on: January 31, 2011, 02:38:40 am »
Looks like you didn't copy the sndfile framework in /Library/Frameworks.
Want to play movies in your SFML application? Check out sfeMovie!

esotericsean

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://seanduran.com
Having trouble getting sf::Music working in Xcode
« Reply #5 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.

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.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Having trouble getting sf::Music working in Xcode
« Reply #6 on: January 31, 2011, 11:45:21 am »
You're still not linking your app against the sfml-audio framework.
Want to play movies in your SFML application? Check out sfeMovie!

esotericsean

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://seanduran.com
Having trouble getting sf::Music working in Xcode
« Reply #7 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 :)