I'm trying to connect the sfml library to my VC++ project. I use VS15 , Release mode without using dll . I do everything in accordance with this official instruction http://www.sfml-dev.org/tutorials/2.4/start-vc.php for static linking. If I specify sfml-graphics-s.lib;sfml-window-s.lib;sfml-system-s.lib;opengl32.lib;freetype.lib;jpeg.lib;winmm.lib;gdi32.lib; in the "additional dependencies" sfml-graphics-s.lib;sfml-window-s.lib;sfml-system-s.lib;opengl32.lib;freetype.lib;jpeg.lib;winmm.lib;gdi32.lib; + inherited values, I get
Error LNK1181 cannot open input file "sfml-graphics-s.lib"
If you get into the lib folder and write the library names libsfml-graphics-sa , etc., directly in the dependencies, this error disappears and errors of unresolved external characters appear.
The main.cpp file from the tutorial
#include "stdafx.h" // там есть #include <SFML\Graphics.hpp> int main() { sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); sf::CircleShape shape(100.f); shape.setFillColor(sf::Color::Green); while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) window.close(); } window.clear(); window.draw(shape); window.display(); } return 0; } How can this be fixed?
SFML_STATICadded if anything - Sergeysfml-graphics-s.libfile does not open -sfml-graphics-s.lib.ais for Linux, I.a. Or maybe for MinGW. Try to make sure that you download the binaries just for Visual Studio. - VladD