Hi!
I try to build the engine on my MacBook pro ( Darwin MacBookPro.home 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:53:28 PST 2026; root:xnu-12377.91.3~2/RELEASE_X86_64 x86_64) and I got these errors in my Xcode, below
(extract the lib from zip, open the project file in the source directory and start the build)
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/_stdio.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/_stdio.h:322:7 Expected identifier or '('
in file included from /Users/s...h/Projects/irrlicht-1.8.5/source/Irrlicht/zlib/zutil.c:10:
in file included from /Users/s...h/Projects/irrlicht-1.8.5/source/Irrlicht/zlib/gzguts.h:21:
in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/stdio.h:61:
expanded from macro 'fdopen'
expanded from macro 'NULL'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/_stdio.h:322:7 Expected ')'
in file included from /Users/s...h/Projects/irrlicht-1.8.5/source/Irrlicht/zlib/zutil.c:10:
in file included from /Users/s...h/Projects/irrlicht-1.8.5/source/Irrlicht/zlib/gzguts.h:21:
in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/stdio.h:61:
expanded from macro 'fdopen'
expanded from macro 'NULL'
to match this '('
OSX build error with _stdio
Re: OSX build error with _stdio
I did some digging into this. This is apparently a known issue in older versions of zlib when trying to compile with current versions of clang. Have you tried replacing the version of zlib that comes with Irrlicht with a newer version. I found the commit on the zlib repo from 2024 where this was fixed so it should not be a problem in the latest version.
If you want to look into this yourself, I have included the links to the issue and the fix below.
Here is the link to the issue on the repo: https://github.com/madler/zlib/issues/1076
And here is the link to the commit where it was fixed: https://github.com/madler/zlib/commit/4 ... 3196dc8ef9
FYI, I don't own a Mac so I cannot test this myself. I just looked into it.
If you want to look into this yourself, I have included the links to the issue and the fix below.
Here is the link to the issue on the repo: https://github.com/madler/zlib/issues/1076
And here is the link to the commit where it was fixed: https://github.com/madler/zlib/commit/4 ... 3196dc8ef9
FYI, I don't own a Mac so I cannot test this myself. I just looked into it.