Link errors while using zig for building a test application with yaml-cpp

I got the same error and tried the libstdc++ theory, and it seems to be the case you’ll have to jump through some hoops, e.g. Troubleshooting for linking with pre-built static libraries - #4 by korke

If you additionally add the right include directories for c++, and link with unwind, it builds:

https://zigbin.io/647b65 (a variation on the addObjectFile trick above)

That said, I would rather build the external lib from source using the same libc++

2 Likes