1
General / 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:
"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
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