Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Getting LNK Errors.  (Read 733 times)

0 Members and 1 Guest are viewing this topic.

Ripol

  • Newbie
  • *
  • Posts: 2
    • View Profile
Getting LNK Errors.
« 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:



And yes, I searched online for quite a while, but nothing really helped.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10822
    • View Profile
    • development blog
    • Email
Re: Getting LNK Errors.
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Ripol

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Getting LNK Errors.
« Reply #2 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.

 

anything