-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Building Zig + C projects fail on macOS #6773
Comments
Excellent, thanks @kubkon! Your PR seems to fix C compilation but C++ compilation still fails with just You can reproduce by just testing on this repo (https://github.com/prime31/zig-upaya) that has C code (Sokol) and C++ (Dear ImGui) mixed with the zig. I made a branch that is updated to be compatible with Zig master as of today. Repro steps:
|
Thanks for the report @prime31! Would you mind opening a new issue specifically for your C++ issue? |
The main issue seems to be a regression in Zig's ability to build and link c/c++ code. A few months back there was a change made to zig that I haven't yet pin-pointed. Since that time Zig has been unable to build an executable in a project with C++ code in it (C still worked at that time). Using today's master, neither C nor C++ code in a Zig project will build.
Some Example projects with Zig and C/C++ code that work with previous versions of Zig (
0.6.0+68bf29c31
is the last working version I have available):https://github.com/floooh/sokol-zig
https://github.com/prime31/zig-upaya
https://github.com/prime31/zig-miniaudio
The errors are generally the same for all projects. Here is one example:
The text was updated successfully, but these errors were encountered: