SDL3 for Visual Studio - include "" or <>

Hello,

why are the include instructions in SDL.h in the package SDL3-devel-3.4.10-VC not in the ‘windows style’ anymore?

‘Windows style’:

#include “SDL_stdinc.h”

‘Linux style’:

#include <SDL3/SDL_stdinc.h>

Visual Studio 2026 Developer Command Prompt does not like the ‘Linux style’:

fatal error C1083: Cannot open include file: ‘SDL3/SDL_stdinc.h’

Any solutions?

Kind regards,

Nik

It’s not so much a Windows vs Linux thing, but rather that the two styles say where to look for the libraries. The quotes-style says to look in the local directory while angle-bracket-style says to check the system’s header path.

The big benefit to the “quotes-style” is that if no local files are found, most compilers then search the system path as well.

I don’t know why SDL3/SDL.h has switched to angle-brackets-style includes, but you can edit your project include directory setting to include your local SDL header and dll directories. (Please follow steps 4-9 in the lazyfoo link). I think this will fix the issue.

1 Like

You shouldn’t have to modify the code when compiling on different platforms.

https://wiki.libsdl.org/SDL3/FAQDevelopment#include
The most portable way to include SDL headers is to use angular quotes around the full header name:

#include <SDL3/SDL.h>

This is new in SDL3! Previously, in SDL2, we recommended #include "SDL.h", but this proved to be unfriendly to macOS frameworks …

2 Likes

Apple frameworks want to be included this way: brackets, not quotes, a framework name as an explicit directory. It was easier to stop fighting it in SDL3.