summaryrefslogtreecommitdiffhomepage
path: root/examples/build.zig
diff options
context:
space:
mode:
authorPeter0x44 <[email protected]>2024-02-22 22:06:22 +0000
committerGitHub <[email protected]>2024-02-22 23:06:22 +0100
commit31c6a340abd1a3530591341ca4d05481004612e4 (patch)
tree8adf4d286faa2dee8a8545b657e703d66bde576c /examples/build.zig
parent4f283a0789b896f4b71ec1cffca959dd0902a5e1 (diff)
downloadraylib-31c6a340abd1a3530591341ca4d05481004612e4.tar.gz
raylib-31c6a340abd1a3530591341ca4d05481004612e4.zip
Remove all uses of deps/mingw (#3805)
The purpose of this directory in GLFW is to provide some headers that "mingw.org" doesn't. Raylib has long been unable to build with mingw.org due to using certain symbols that aren't exposed in their headers. (_ftelli64 and _access, among others.). Mingw-w64 already has the necessary headers included, and doesn't need any of these external implementations. For some reason, this also causes the following error when building with Visual Studio's clang: clang -c rglfw.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing -std=c99 -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw In file included from rglfw.c:61: In file included from ./external/glfw/src/init.c:30: In file included from ./external/glfw/src/internal.h:331: In file included from ./external/glfw/src/platform.h:31: In file included from ./external/glfw/src/win32_platform.h:70: external/glfw/deps/mingw\xinput.h:227:26: error: a parameter list without types is only allowed in a function definition 227 | void WINAPI XInputEnable(WINBOOL); | If the last -Iexternal/glfw/deps/mingw is removed, the build works fine. So, this workaround causes other problems, while not actually helping raylib. https://github.com/glfw/glfw/blob/0bb605cd797e4d63709495f4074ec59362064ab4/src/CMakeLists.txt#L272-L279 GLFW's CMakeLists.txt first checks if either dinput.h or xinput.h are provided by the toolchain, before telling the compiler to search for headers in that directory. For EVERY compiler that can build raylib, this is true. In summary: This directory causes issues when building with some compilers, and every toolchain that needs this workaround can't build raylib anyway.
Diffstat (limited to 'examples/build.zig')
-rw-r--r--examples/build.zig1
1 files changed, 0 insertions, 1 deletions
diff --git a/examples/build.zig b/examples/build.zig
index deb381d5..e56ac0d5 100644
--- a/examples/build.zig
+++ b/examples/build.zig
@@ -55,7 +55,6 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: anytype, optim
exe.linkSystemLibrary("winmm");
exe.linkSystemLibrary("gdi32");
exe.linkSystemLibrary("opengl32");
- exe.addIncludePath(.{ .path = "external/glfw/deps/mingw" });
exe.defineCMacro("PLATFORM_DESKTOP", null);
},