I'm trying to compile on Ubuntu.
There's no 2.1 package using apt-get, so I tried the CMake tutorial -
2.1 doesn't appear to have a CMakeLists.txt so I tried CodeBlocks -
I set up the compiler and linker search directories, linker settings, and I'm getting the following errors:
-------------- Build: Release in proj1 ---------------
Linking console executable: bin/Release/proj1
/usr/bin/ld: skipping incompatible /home/user/libs/SFML21/lib/libsfml-graphics.so when searching for -lsfml-graphics
/usr/bin/ld: cannot find -lsfml-graphics
/usr/bin/ld: skipping incompatible /home/user/libs/SFML21/lib/libsfml-window.so when searching for -lsfml-window
/usr/bin/ld: cannot find -lsfml-window
/usr/bin/ld: skipping incompatible /home/user/libs/SFML21/lib/libsfml-system.so when searching for -lsfml-system
/usr/bin/ld: cannot find -lsfml-system
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
3 errors, 0 warnings
I've tried it with and without using the SFML_STATIC macro. What's with the incompatible .so message?
Giving up, I tried compiling through the terminal-
g++ -c main.cpp -Ihome/libs/SFML21/include
and I get
main.cpp:2:29: fatal error: SFML/Graphics.hpp: No such file or directory
compilation terminated.
I don't understand why all of these seem to think that this directory doesn't exist... it's definitely there.
I'm a Linux newbie but this seems like it should be straightforward... What am I doing wrong?