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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - deadHippy

Pages: [1]
General / SOLVED!!!: Can't get SFML 2.5.1 working with Visual Studio 19
« on: August 23, 2021, 12:42:33 am »
I've followed several explanations, tutorials and videos showing how to use SMFL 2.5.1 with Visual Studio 19, however, when I try to compile the example from the very first tutorial on here (https://www.sfml-dev.org/tutorials/2.5/start-vc.php), I get the following errors:

1>------ Build started: Project: sfml19 test, Configuration: Debug Win32 ------
1>Source.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>Source.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>D:\Documents\PROGRAMMING\sfml19 test\Debug\sfml19 test.exe : fatal error LNK1120: 2 unresolved externals
1>Done building project "sfml19 test.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I'm assuming it is related to the static linking, yet I have followed all the tutorials/videos/etc to the letter.

Any ideas as to how to resolve this? I've been really looking forward to trying SFML and it would be demoralising to fall at the first hurdle.

UPDATE!!! OK. I got this solved. It seems that after going through the static linking process the solution configurations had been set to DEBUG. I don't know if that is because DEBUG was the last link I edited(?), I'm new to this, so most stuff is way over my head. I simply changed the configuration to RELEASE and TA-DA... the example program compiled and a nice green circle appeared on my screen. I was just gonna take this post down, but thought it might come in handy if someone else is tearing their hair out with a similar issue. P.S. the Solution Configuration is set with button on the top toolbar just underneath "Build" & "Debug" on the top menu bar.

Pages: [1]