I tried to get SFML to work for a while, and I tried to get it to work using GCC. By the way, I'm on OS X. I followed the standard Linux instructions and use the 64-bit Linux boot, but when it comes to compiling ...
g++ -o testing main.cpp -lsfml-system
It happens:
main.cpp: In function ‘int main()’:
main.cpp:7: error: ‘class sf::Clock’ has no member named ‘GetElapsedTime’
main.cpp:9: error: ‘class sf::Clock’ has no member named ‘GetElapsedTime’
main.cpp:10: error: ‘Sleep’ is not a member of ‘sf’
So, I thought this might be due to being not used, so I changed the gcc compilation command to:
g++ -o testing main.cpp -I ~/SFML-1.6/include/ -lsfml-system
and now I get this error:
ld: warning: ignoring file /usr/local/lib/libsfml-system.so, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"sf::Clock::Clock()", referenced from:
_main in ccZEiB7b.o
"sf::Clock::GetElapsedTime() const", referenced from:
_main in ccZEiB7b.o
"sf::Sleep(float)", referenced from:
_main in ccZEiB7b.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status**
And I have no idea what to do to fix it.
source
share