SFML community forums
General => General discussions => Topic started by: SuperFunMegaLazy on November 18, 2023, 05:10:23 am
-
I'm compiling against 2.6.1, and am including
#pragma comment( lib, "sfml-main.lib")
#pragma comment( lib, "sfml-graphics.lib")
#pragma comment( lib, "sfml-system.lib")
#pragma comment( lib, "sfml-window.lib")
in my program, and when it links, on the sample tut, it can't find Green (the static color), and it can't find external symbol static class sf::RenderStates const sf::RenderStates::Default.
Has anybody else seen this?
a
-
I recommend to either use the project properties to configure your linker configuration, see the official tutorial (https://www.sfml-dev.org/tutorials/2.6/start-vc.php), or use the CMake Project Template, which will automatically download and configure SFML.
Using #pragma comment isn't crossplatform and thus you're coupling your code to VS.
Make sure you're not setting SFML_STATIC if you're link SFML dynamically.