Compile SDL2 on Windows 8.1

Hi all

I tried to build SDL2 from sources on Windows 8.1 using command line as follows:

Installed following:

  1. Microsoft Visual Studio 2013 (free version)

  2. Cmake (binary version)

  3. Installed LLVM+Clang

SDL2:

  1. Unpack SDL2-2.0.3.zip

  2. Used Cmake GUI to set options: DirectX selected.

  3. mkdir build

  4. cd build

  5. cmake --build .

I get following error:

LINK : fatal error LNK1104: cannot open file ‘dxerr.lib’

Btw, dxerr.lib is now deprecated and removed from Windows SDK 8.1, therefore, no such file in my system.

Following shows FormatMessage must be used instead of dxerr:

http://blogs.msdn.com/b/chuckw/archive/2012/04/24/where-s-dxerr-lib.aspx

My questions:

  1. Is there a compiler switch (-Dxxx) to use FormatMessage instead of dxerr on Windows 8.1?

  2. Is there a patch for SDL2 to use FormatMessage instead of dxerr on Windows 8.1?

Best regards
Unga

At a glance, it doesn’t look like SDL2 is actively using dxerr, with the calls into DXGetError* being commented-out.

Maybe try removing the dxerr .lib reference(s) from SDL2’s CMake file, then rebuild?

– David L.

Thanks David. Compilation issue was solved by?removing dxerr references.
UngaOn Wednesday, April 29, 2015 1:48 AM, DLudwig wrote:

At a glance, it doesn't look like SDL2 is actively using dxerr, with the calls into DXGetError* being commented-out.

Maybe try removing the dxerr .lib reference(s) from SDL2’s CMake file, then rebuild?

– David L.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org