SFML community forums

Help => General => Topic started by: Ripol on October 23, 2015, 05:12:49 pm

Title: Getting LNK Errors.
Post by: Ripol on October 23, 2015, 05:12:49 pm
So hi. I wanted to start working with SFML but for the past few days I keep getting different LNK errors. I work with VS2012 and followed the tutorial in the official website step by step, and tried to run the code that was given there. However, I got the following errors:

(http://srv2.jpg.co.il/4/562a4df700616.png) (http://"http://jpg.co.il/view/562a4df700616.png/")

And yes, I searched online for quite a while, but nothing really helped.
Title: Re: Getting LNK Errors.
Post by: eXpl0it3r on October 23, 2015, 05:34:51 pm
Did you go step by step looking at the pictures or step by step read and understanding the text? ;)

The first two errors appear when you define SFML_STATIC but link against SFML dynamically (or the other way around?). If you link statically define SFML_STATIC otherwise don't define it.

The third error happens when you set your project's subsystem to window but don't link against sfml-main (or the other way around?). If you set the subsystem to console you shouldn't link against sfml-main, but if you set your subsystem to window, you should link against sfnl-main. Additionally you should always use the int main() function as your entry point.
Title: Re: Getting LNK Errors.
Post by: Ripol on October 24, 2015, 09:16:45 pm
Did you go step by step looking at the pictures or step by step read and understanding the text? ;)

The first two errors appear when you define SFML_STATIC but link against SFML dynamically (or the other way around?). If you link statically define SFML_STATIC otherwise don't define it.

The third error happens when you set your project's subsystem to window but don't link against sfml-main (or the other way around?). If you set the subsystem to console you shouldn't link against sfml-main, but if you set your subsystem to window, you should link against sfnl-main. Additionally you should always use the int main() function as your entry point.

Thanks, I managed to get rid of the errors. However, now when I try to run my program I get a error message saying that sfml-system-d-2 is missing, even though it's in the project folder with all the other DLLs.