Skip to content

raylib and windows.h colliding symbols #1569

Answered by raysan5
dangmoody asked this question in Q&A
Discussion options

You must be logged in to vote

Just for completion on this discussion, here there are three options to avoid conflicts, I tested all them and they work.

  1. Define the required symbols from windows.h instead of including the full header.

  2. Compile the windows.h with functions using it on an independent module/code-unit (a separate .c file to generate a separate .o) and link with it.

  3. Try to avoid conflics with windows.h defines:

#if defined(_WIN32)
// To avoid conflicting windows.h symbols with raylib, some flags are defined
// WARNING: Those flags avoid inclusion of some Win32 headers that could be required
// by user at some point and won't be included...
//-----------------------------------------------------------…

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Mike430
Comment options

Comment options

You must be logged in to vote
1 reply
@Mike430
Comment options

Comment options

You must be logged in to vote
1 reply
@dangmoody
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by raysan5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants