Cmake win7 support

Is CMake supported for windows 7? I’m having some troubles with some
DirectX stuff.

I’m trying to compile SDL-2.0.3-9108. I generate the solution for VS 2013
with CMake 3.0.1 and when I try to compile seems like the following symbols
are not defined:

LPDIRECTSOUND
LPDIRECTSOUNDBUFFER

within the following structure

/* The DirectSound objects */
struct SDL_PrivateAudioData
{
LPDIRECTSOUND sound;
LPDIRECTSOUNDBUFFER mixbuf;
int num_buffers;
int mixlen;
DWORD lastchunk;
Uint8 *locked_buf;
};

I had to modify the SDL_window.h file to add the following line

#include “SDL_config_windows.h”

I’m sure I’m missing something to avoid adding that line but even that I
was able to compile I also had several linkage problems

LNK2019: unresolved external symbol _SDL_EGL_GetProcAddress
LNK2001: unresolved external symbol _SDL_XInputGetCapabilities

Can someone help me with this issues?

Is there any documentation on how to build sdl on windows by using cmake?

Best regards,

Le?n Moctezuma

Ok I finally was able to make it compile and link but I had to patch two
files

SDL_windows.h
SDL_config_windows.h

I see that cmake generates a SDL_config.h file but the thing doesn’t seem
to be working as intended there are some macros that get defined if there
is no definition at all. So the cmake should generate the SDL_config.h file
defining those macros with a 0 value at least, otherwise you get a lot of
compiling and linking errors.

I had to comment the following lines in SDL_config_windows.h

#ifndef SDL_VIDEO_RENDER_OGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 1
#endif
#ifndef SDL_VIDEO_OPENGL_ES2
#define SDL_VIDEO_OPENGL_ES2 1
#endif
#ifndef SDL_VIDEO_OPENGL_EGL
#define SDL_VIDEO_OPENGL_EGL 1
#endif

The other issue is to include the SDL_config_windows.h file in SDL_window.h
in order to make the directsound thing compile.

Maybe I missed something, please let me know if I did something wrong.

Best regards,

Leon MoctezumaOn Sun, Sep 7, 2014 at 7:40 PM, Leon Moctezuma <@Leon_Moctezuma> wrote:

Is CMake supported for windows 7? I’m having some troubles with some
DirectX stuff.

I’m trying to compile SDL-2.0.3-9108. I generate the solution for VS 2013
with CMake 3.0.1 and when I try to compile seems like the following symbols
are not defined:

LPDIRECTSOUND
LPDIRECTSOUNDBUFFER

within the following structure

/* The DirectSound objects */
struct SDL_PrivateAudioData
{
LPDIRECTSOUND sound;
LPDIRECTSOUNDBUFFER mixbuf;
int num_buffers;
int mixlen;
DWORD lastchunk;
Uint8 *locked_buf;
};

I had to modify the SDL_window.h file to add the following line

#include “SDL_config_windows.h”

I’m sure I’m missing something to avoid adding that line but even that I
was able to compile I also had several linkage problems

LNK2019: unresolved external symbol _SDL_EGL_GetProcAddress
LNK2001: unresolved external symbol _SDL_XInputGetCapabilities

Can someone help me with this issues?

Is there any documentation on how to build sdl on windows by using cmake?

Best regards,

Le?n Moctezuma


Le?n Moctezuma