I have downloaded SFML 2.4.2 for Visual C++ 14 (2015) - 32-bit, and I am trying to run the program on x86. More specifically SFML-2.4.2-windows-vc14-32-bit (as the zip file is currently named).
I am having issues with setting SFML up, and I am currently receiving a single error.
The error I have:
ERROR: LNK1104 cannot open file 'winmm.lib'
PROJECT PROPERTIES
Additional Library Directiories: C:\SFML\lib;%(AdditionalLibraryDirectories)
Additional Include Libraries: C:\SFML\include;%(AdditionalIncludeDirectories)
Preprocessor Defition: SFML_STATIC;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
ADDITIONAL DEPENDENCIESRELEASE:sfml-graphics-s.lib
sfml-window-s.lib
sfml-system-s.lib
freetype.lib
jpeg.lib
opengl32.lib
winmm.lib
DEBUG:sfml-graphics-s-d.lib
sfml-window-s-d.lib
sfml-system-s-d.lib
freetype.lib
jpeg.lib
opengl32.lib
winmm.lib
Other relavent details:
Currently using the latest version of Visual Studio 2017 (reinstalled again as of 5:00AM, 24/01/2018 GMT+0)
It worked when I pasted it into a template win32 application but the auto-generated code was practically impossible to remove without breaking the program, AND I assume there must be a way to do it from an empty project, I am just probably missing something.
Code:
#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;
}