SFML community forums
Help => General => Topic started by: Gakinhos on April 24, 2016, 01:12:27 am
-
So I installed SFML and tried to compile the test code but I had a problem building it, I tried to search how to fix it on the internet but I can't find it... I'll leave here images with the problems I have when I try to build it. (I'm using CodeBlocks)
http://prntscr.com/aw0xus
http://prntscr.com/aw0xwt
http://prntscr.com/aw0xyi
-
Starting from SFML 2.2, when static linking, you will have to link all of SFML's dependencies to your project as well. This means that if you are linking sfml-window-s or sfml-window-s-d for example, you will also have to link opengl32, winmm and gdi32. Some of these dependency libraries might already be listed under "Inherited values", but adding them again yourself shouldn't cause any problems.
I tried to search how to fix it on the internet but I can't find it... I'll leave here images with the problems I have when I try to build it.
Maybe they also left "images with the problems they had" so that nobody could find the answer with a search engine.
-
http://prnt.sc/aw1mtk
Is that right? Sorry if I did a dumb mistake but I'm new into this stuff... (I keep getting the error)
-
http://prnt.sc/aw1mtk
Is that right? Sorry if I did a dumb mistake but I'm new into this stuff... (I keep getting the error)
You make no mention of your OS or compiler. If you are using Visual Studios then that linking order should be ok, but if you are using MinGW as a compiler it probably won't work. Review these pages as they list the dependencies of each SFML module:
http://www.sfml-dev.org/tutorials/2.3/start-vc.php
and
http://www.sfml-dev.org/tutorials/2.3/start-cb.php
You may need to shift your linking order to get things to compile correctly. If you want better explanations to your issues then follow this guide:
http://en.sfml-dev.org/forums/index.php?topic=5559.0
or perhaps one more knowledgeable than me can link to.
-
YES! I actually got it to work, took me quite a while but now I kinda understand, thanks, you guys helped me a lot :) (Btw I was using CodeBlocks)