Hello folks, I'm having trouble trying to get SFML working. I'm on Win7 64bit using Code::Blocks 12.11 with Mingw compiler (x64-4.8.1-release-win32-sjlj-rev3). The problem:
Build messages:
||=== SFML Test, Debug ===|
ld.exe||cannot find -lsfml-graphics-d|
ld.exe||cannot find -lsfml-window-d|
ld.exe||cannot find -lsfml-system-d|
||=== Build finished: 3 errors, 0 warnings (0 minutes, 2 seconds) ===|
Build Log:
-------------- Build: Debug in SFML Test (compiler: GNU GCC Compiler)---------------
x86_64-w64-mingw32-g++.exe -L..\..\Libraries\SFML-2.1\lib -o "bin\Debug\SFML Test.exe" obj\Debug\src\main.o -lsfml-graphics-d -lsfml-window-d -lsfml-system-d -mwindows
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-graphics-d.a when searching for -lsfml-graphics-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib\libsfml-graphics-d.a when searching for -lsfml-graphics-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-graphics-d.a when searching for -lsfml-graphics-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-graphics-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-window-d.a when searching for -lsfml-window-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib\libsfml-window-d.a when searching for -lsfml-window-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-window-d.a when searching for -lsfml-window-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-window-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-system-d.a when searching for -lsfml-system-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib\libsfml-system-d.a when searching for -lsfml-system-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ..\..\Libraries\SFML-2.1\lib/libsfml-system-d.a when searching for -lsfml-system-d
c:/c++/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsfml-system-d
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
3 errors, 0 warnings (0 minutes, 2 seconds)
I will try to list everything to help diagnose the problem. I started out here:
http://www.sfml-dev.org/tutorials/2.1/start-cb.phpI followed it to a t.
I set the include / lib paths globally as stated, then linked as stated. As they said not to include .a or lib prefix, and by the looks of it they simply typed the name in (rather the clicking the actual file in the file browser), so I typed the correct ones.
Build options>Linker settings>Link libraries
Release:
sfml-graphics
sfml-window
sfml-system
Debug:
sfml-graphics-d
sfml-window-d
sfml-system-d
Everything in the screenshots matches mine exactly. I'm linking dynamically.
The version I downloaded was GCC 4.7 TDM (SJLJ) - 32 bits. My compiler is properly installed I believe as I've used it perfectly for console applications and C++11 for some time. When I got Code::Blocks I had to get Mingw seperatly (if I recall, because I was on 64bit), not a Code::Blocks supplied one. The Mingw download zip was named x64-4.8.1-release-win32-sjlj-rev3, which I believe is SJLJ and matches the SFML download.
This is what my "Global Compiler Settings" look like:
I hope that was thorough enough, can somebody please help?