Hello,
unable to compile the "opengl" example of SFML.
Windows 7,
SFML 2.3.2 - 32 bit,
TDM with gcc 4.8.1
Codeblocks 16.01
I followed exactly the instructions on the SFML tutorial page. All needed files are availabe, and I think codeblocks is well configured. The first example of the tutorial compiles and runs fine, the SFML example "window" too. But trying to compile the example "opengl" I get the error messages below. Just the lines where some ressources have to be loaded.
-------------- Build: Debug in SFML01 (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -g -IE:\Projekte\Codeblocks\include -c E:\Projekte\Codeblocks\SFML01\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -LE:\Projekte\Codeblocks\lib -o bin\Debug\SFML01.exe obj\Debug\main.o -lopengl32 -lsfml-audio-d -lsfml-graphics-d -lsfml-window-d -lsfml-system-d
obj\Debug\main.o: In function `main':
E:/Projekte/Codeblocks/SFML01/main.cpp:27: undefined reference to `_imp___ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE'
E:/Projekte/Codeblocks/SFML01/main.cpp:33: undefined reference to `_imp___ZN2sf4Font12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
E:/Projekte/Codeblocks/SFML01/main.cpp:52: undefined reference to `_imp___ZN2sf5Image12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
4 error(s), 0 warning(s) (0 minute(s), 0 second(s))
The same errors I got by trying other combinations of SFML and gcc. On Linux this example works without any troubles.