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

Author Topic: OSX - Error when running sfml app  (Read 1602 times)

0 Members and 1 Guest are viewing this topic.

vro

  • Newbie
  • *
  • Posts: 44
    • View Profile
OSX - Error when running sfml app
« on: October 10, 2013, 10:19:57 pm »
Hi everyone. I'm getting:
"Class SFApplication is implemented in both /Library/Frameworks/sfml-window.framework/Versions/2.1.0/sfml-window and /usr/local/lib/libsfml-window.2.dylib. One of the two will be used. Which one is undefined."
And some additional errors like this for other classes.

It compiles, I just get this error when I run the app. I've also tried "-L /Library/Frameworks"

I have everything running/compiling fine on Windows but I wanted to be able to work on my mac.

Any ideas? I tried using XCode as well but I couldn't get it to compile with TGUI. So I'm using sublime/make. My makefile looks like this:

client: main.o
        g++ -o client -L /usr/local/lib/ main.o -ltgui -lsfml-network -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-window -lsfml-system

main.o: main.cpp mainmenu.o settings.o connect.o multiplayer.o singleplayer.o
        g++ -c main.cpp -o main.o

screen.o: screens/screen.h
        g++ -c screens/screen.h -o screen.o

mainmenu.o: screens/mainmenu.h
        g++ -c screens/mainmenu.h -o mainmenu.o

settings.o: screens/settings.h
        g++ -c screens/settings.h -o settings.o

connect.o: screens/connect.h
        g++ -c screens/connect.h -o connect.o

multiplayer.o: screens/multiplayer.h
        g++ -c screens/multiplayer.h -o multiplayer.o

singleplayer.o: screens/singleplayer.h
        g++ -c screens/singleplayer.h -o singleplayer.o

client.o: client.h
        g++ -c client.h -o client.o

singleton.o: singleton.h
        g++ -c singleton.h -o singleton.o

player.o: entities/player.h
        g++ -c entities/player.h -o player.o

ship.o: entities/ship.h
        g++ -c entities/ship.h -o ship.o

clean:
        rm -rf *.o client
 

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: OSX - Error when running sfml app
« Reply #1 on: October 11, 2013, 02:20:08 pm »
how was tgui compiled?
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: OSX - Error when running sfml app
« Reply #2 on: October 11, 2013, 10:25:40 pm »
NB: you're linking twice against sfml-window
Want to play movies in your SFML application? Check out sfeMovie!

 

anything