Skip to content

Commit

Permalink
Add a note about windows.h
Browse files Browse the repository at this point in the history
  • Loading branch information
bullno1 committed Nov 2, 2024
1 parent 3b07d74 commit 4a7f795
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ Simply list the name, dll and arity in that file.
This requires making upstream changes to cosmopolitan.
As of this writing, the required changes are merged and `sokol_app` + `sokol_gfx` can run on Windows.

`windows.h` (and its transitive headers) includes a lot of struct definitions and macros.
Unfortunately, including the official `windows.h` directly or its MinGW counterpart often results in a lot of duplicated and conflicting definitions when compiling using cosmocc.
Therefore, all relevant definitions are instead replicated inside [`sokol_windows.c`](shims/sokol/sokol_windows.c).

### Multi-platform runtime

sokol makes use of platform ifdef to selectively compile platform-dependent code.
Expand Down

0 comments on commit 4a7f795

Please sign in to comment.