I’ve downloaded the source files from https://www.libsdl.org/release/SDL2-2.0.5.zip
I used Cmake to generate the visual studio file and opened it up in Visual Studio 2015. I directly tried to build all the projects and 7 projects failed to build: loopwave, testoverlay2, testrendertarget, testscale, testsprite2, testgamecontroller, & controllermap
They each complained during compile that ‘The system cannot find the file specified’. Perhaps I should have installed some other libraries prior to SDL2? And/or did I fail to point to necessary additional libraries w/in CMake before generating the Visual Studio solution? Any ideas?
I’m building on Windows 10, 64-bit using CMake 3.7.1 & MSVS 2015
Can you paste all the error messages you got in here? The missing file is probably the SDL library itself, which failed to compile for some other reason, so all those test programs proceed to fail afterwards.
(btw, the “VisualC” directory has a .sln file you can use directly, which I think works with Visual Studio 2015, if you’d rather not use CMake.)
@icculus, Thanks for the response. It prompted me to take a harder look at the error messages. Turns out that it was reporting that it could not find a bunch of files (mostly *.bmp files) that were added to each project. For example, controller map referenced three files axis.bmp, button.bmp & controllermap.bmp. The files definitely exist in the ‘test’ folder that is part of the SDL download - but for some reason Visual Studio had lost track of those file locations I guess.
So for each of the seven projects that were reporting errors, I just went in and removed the suspect files and re ‘added’ them. Once I did that everything built.
I’m not sure what was causing Visual Studio to lose track of the files. But it was a relatively painless fix! Thanks again for the input.
I’m not sure what was causing Visual Studio to lose track of the files.
But it was a relatively painless fix! Thanks again for the input.
If I recall correctly, the Visual Studio project files copy those
bitmaps into the final build directories, but I bet we never did that
with the CMake file. I’ll have to check.
If you want, feel free to file a bug at https://bugzilla.libsdl.org/ so
we don’t forget to fix that!