zig-gamedev: cbullet compile failed on linux

Hi @michal-z, I’m trying to compile cbullet on linux/x64, got following error:

cbullet.cpp:628:1: error: static_assert failed due to requirement '(sizeof(btTriangleIndexVertexArray) % 16) == 0' "sizeof(btTriangleIndexVertexArray) is not multiple of 16"
cbullet.cpp:814:1: error: static_assert failed due to requirement '(sizeof(btRigidBody) % 16) == 0' "sizeof(btRigidBody) is not multiple of 16"
cbullet.cpp:816:1: error: static_assert failed due to requirement '((sizeof(btRigidBody) + sizeof(btDefaultMotionState)) % 16) == 0' "sizeof(btRigidBody) + sizeof(btDefaultMotionState) is not multiple of 16"

My zig version is latest release 0.9.0.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

Yeah, it’s open repo on github, feel free to check out. Though it’s not mature enough to do serious work yet, cause I’m really a newbie in gamedev territory 😃 https://github.com/Jack-Ji/zplay

I’ve changed requirements to 8. It is enough, all should work fine. Please let me know once you get it running on Linux.

Just checked Zig sources, linkSystemLibrary(“c”) calls linkLibC() and linkSystemLibrary(“c++”) calls linkLibCpp(). So, there is no difference.

    pub fn linkSystemLibrary(self: *LibExeObjStep, name: []const u8) void {
        if (isLibCLibrary(name)) {
            self.linkLibC();
            return;
        }
        if (isLibCppLibrary(name)) {
            self.linkLibCpp();
            return;
        }