Menu

#414 WIN32: MSVC: allow to use prefix for SDL2 include files.

v3.x
closed-accepted
gpz
None
bugfix
2025-11-30
2025-11-29
No

When using MSVC with VCPKG, unfortunately the IDE is not able to find files likem SDL.h in any way.
The only way to make it working is to use:

#include <SDL2/SDL.h>

instead of:

#include <SDL.h>

Hopefully, the code allows to automate this selection by using USE_SDL_PREFIX.
This macro is left always undefined when using configure script and SDL2 is used.
So, I added with a simple patch the chance to allow the selection of the 2 different types of inclusion also for SDL2. As result, in my config.h for MSVC, I added the definition of USE_SDL_PREFIX and this has fixed the build of SDL2 ui.

1 Attachments

Discussion

  • gpz

    gpz - 2025-11-29

    cant this be solved by adding the respective include path in the msvc project?

     
  • Carlo Bramini

    Carlo Bramini - 2025-11-30

    Yes, I think that it can be also done like this, if you accept to manually add the path into the properties of the project.

     
  • gpz

    gpz - 2025-11-30

    i had a closer look now - apparently we already use USE_SDL_PREFIX in configure, so we can just as well also recognize it for SDL2

     
  • gpz

    gpz - 2025-11-30

    applied in r45883

     
  • gpz

    gpz - 2025-11-30
    • status: open --> closed-accepted
    • assigned_to: gpz
     

Log in to post a comment.

MongoDB Logo MongoDB