SFML community forums
Help => General => Topic started by: NGM88 on January 21, 2017, 09:41:41 pm
-
Here's what I have done so far, step by step:
1- downloaded codeblocks-16.01mingw-setup and installed it. codeblocks is working fine.
2- downloaded GCC 4.9.2 TDM (SJLJ) - 32-bit and put it in C:\SFML-2.4.1
3- created an empty project in codeblocks
4- went to Project -> Build Options.
selected the project name from the left menu so that the settings are global (applying to both Debug and Release).
added "C:\SFML-2.4.1\include" under Search Directories -> Compiler
added "C:\SFML-2.4.1\lib" under Search Directories -> Linker
said No to "Keep this as relative path?" on both occasions.
5- selected Debug from the left menu.
went to Linker Settings, added:
sfml-graphics-s-d
sfml-window-s-d
sfml-system-s-d
6- selected Release from the left menu.
went to Linker Settings, added:
sfml-graphics-s
sfml-window-s
sfml-system-s
7- selected the project name from the left menu (global settings)
went to Compiler Settings -> #defines and typed SFML_STATIC in the box.
8- clicked File -> New -> Empty File. Clicked Yes to add the file to the active project.
named it main.cpp and pasted the test code from http://www.sfml-dev.org/tutorials/2.4/start-cb.php into it.
When I run the program I get a ton of "undefined reference to ..." errors. too many to post here.
SFML website says I need to add the opengl32, freetype, jpeg, gdi32 and winmm dependencies under Linker Settings.
I tried this ordering for Debug and the same ordering without "-d"s for Release, but it DIDN'T WORK:
sfml-graphics-s-d
sfml-window-s-d
opengl32
freetype
jpeg
gdi32
sfml-system-s-d
winmm
in what EXACT ORDER do I need to add them?
Also, do I need to add other specific search directories for these to work?
-
Which functions are marked as undefined in particular?
-
Always include the full error message. It's not just an annoying mess of characters, but it tells you exactly what is wrong, all you need to practice is understanding how to interpret them. ;)