Open circle67 opened 2 hours ago
You haven't specified what platform you're building on and what your zig build
invocation looks like.
If you are building using the -msvc
ABI, then you can't use exe.linkLibCpp()
- it fails to compiled under the msvc
ABI.
You can conditionally call that function:
if (target.result.abi != .msvc) {
exe.linkLibCpp();
The msvc
ABI behaviour is to automatically link the system supplied C++ standard library when it's used (https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170#c-standard-library-stl-lib-files)
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
When attempting to build I get a heap of errors (21) with the following build script:
As far as I know, the errors come exclusively from my code (not Raylib or SQLite). I get many "unknown type name 'x'" and "no matching function for call to 'x'" errors:
I have another project in C++ using the Zig build system that builds just fine, so this could all be some massive oversight in my build script or something wrong in my code 🤷
Expected Behavior
I expected it to build.