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 DEPENDENCIES
RELEASE:
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;
}
What's your verbose build output: https://www.sfml-dev.org/faq.php#tr-grl-verbose-ide
1>------ Build started: Project: Fireworks, Configuration: Debug Win32 ------
1>Microsoft (R) Incremental Linker Version 14.12.25834.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>"/OUT:C:\Users\Mantas\Documents\VS Projects\Fireworks\Debug\Fireworks.exe" /INCREMENTAL "/LIBPATH:C:\SFML-2.4.2\lib" "sfml-graphics-s-d.lib" "sfml-window-s-d.lib" "sfml-system-s-d.lib" freetype.lib jpeg.lib opengl32.lib "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\um\x86\WinMM.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FASTLINK "/PDB:C:\Users\Mantas\Documents\VS Projects\Fireworks\Debug\Fireworks.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:C:\Users\Mantas\Documents\VS Projects\Fireworks\Debug\Fireworks.lib" /MACHINE:X86 Debug\main.obj
1>LINK : fatal error LNK1104: cannot open file 'C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\um\x86\WinMM.lib'
1>Done building project "Fireworks.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
What if you provide the absolute path to the lib directly when listing it?
Error LNK1104 cannot open file 'C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\um\x86\WinMM.lib'