Hello.
I just installed SFML and when trying to compile any code I get plenty of
undefined reference to '__imp___ZN2af68...' errors.
So naturally I went to google and it seems like it's common problem. I tried installing SFML again reading installing guide very carefully - same problem.
I'm using Code::Blocks 16.01 with pretty much all default settings (GNU GCC Compiler, seems to be 4.9.2 version according to
THIS code I ran) and I downloaded SFML 2.4.2 - GCC 4.9.2 TDM (SJLJ) - 64bit. Also tried downloading SFML 2.4.2 - GCC 6.1.0 MinGW (SEH) - 64bit.
So what have I done step by step is:
1. Download SFML and extract it somewhere. Open C::B and start new empty project.
2. I went to Project Properties -> Project's build options... -> Search Directories and:
2.1.: -> Compiler: added ...\SFML-2.4.2\include
2.2.: -> Linker: added ...\SFML-2.4.2\lib
3. Then went to "Release" (from the left menu) -> Linker Settings -> and Added these files:
- ...\SFML-2.4.2\lib\libsfml-system.a
- ...\SFML-2.4.2\lib\libsfml-window.a
- ...\SFML-2.4.2\lib\libsfml-network.a
- ...\SFML-2.4.2\lib\libsfml-audio.a
- ...\SFML-2.4.2\lib\libsfml-graphics.a
4. Then went to "Debuf" (from the left menu) -> Linker Settings -> and Added these files:
- ...\SFML-2.4.2\lib\libsfml-system-d.a
- ...\SFML-2.4.2\lib\libsfml-window-d.a
- ...\SFML-2.4.2\lib\libsfml-network-d.a
- ...\SFML-2.4.2\lib\libsfml-audio-d.a
- ...\SFML-2.4.2\lib\libsfml-graphics-d.a
Also tried adding these files in reverse order.
5. Copied all .dll files from "...\SFML-2.4.2\bin" to the location of .exe file "...\Kurs SFML\bin\Debug".
What did I miss? What did I do wrong? I tried re-doing it over and over from the beginning, yet same result - undefined reference.
I better start questioning my programming capabilities.
Thank you for any support.