Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SDL3 close code include #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

alxyng
Copy link
Contributor

@alxyng alxyng commented Nov 3, 2024

Fixes the nested inclusion error

error: Nested inclusion of SDL_begin_code.h

when including SDL library headers after this one e.g.

#define SDL_MAIN_USE_CALLBACKS 1
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3_gpu_shadercross/SDL_gpu_shadercross.h>
#include <SDL3_image/SDL_image.h>

@flibitijibibo
Copy link
Collaborator

I didn't realize we were including begin_code... lgtm but if we can remove begin/end that'd be even better.

@alxyng
Copy link
Contributor Author

alxyng commented Nov 4, 2024

Guess it's a style thing. Looks like SDL_begin_code.h defines SDL_DECLSPEC which the header uses but the macro can be depended on transitively through SDL3/SDL.h and friends. Up to you guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants