Problems building raylib on NixOS

Hello!
I'm trying to build raylib on NixOS using CMake as described in the wiki article about working on GNU Linux. After installing some missing dependencies, running "cmake -DSHARED=ON -DSTATIC=ON .." works fine. However, as soon as I try to run make, I get a lot of error messages like these:

In file included from /home/me/raylib/src/core.c:96:0:
/home/me/raylib/src/raymath.h:402:52: error: unknown type name ‘Quaternion’; did you mean ‘Material’?
RMDEF Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q)
^~~~~~~~~~
Material
/home/me/raylib/src/raymath.h:974:7: error: unknown type name ‘Quaternion’
RMDEF Quaternion QuaternionIdentity(void)
^~~~~~~~~~
/home/me/raylib/src/raymath.h: In function ‘QuaternionIdentity’:
/home/me/raylib/src/raymath.h:976:5: error: unknown type name ‘Quaternion’; did you mean ‘Material’?
Quaternion result = { 0.0f, 0.0f, 0.0f, 1.0f };
^~~~~~~~~~
Material
/home/me/raylib/src/raymath.h:976:33: warning: excess elements in scalar initializer
Quaternion result = { 0.0f, 0.0f, 0.0f, 1.0f };
^~~~
/home/me/raylib/src/raymath.h:976:33: note: (near initialization for ‘result’)
/home/me/raylib/src/raymath.h:976:39: warning: excess elements in scalar initializer
Quaternion result = { 0.0f, 0.0f, 0.0f, 1.0f };

Could this be because of a missing dependency? Since I'm using NixOS, I can't just run "sudo apt install" and the names of the packages also are a bit different, for example xorg-dev is split up into separate modules (xorg.libXi, xorg.libXinerama, xorg.libXcursor etc.)...


Comments

  • Are you using latest GitHub raylib version? Seems related to an already corrected bug, some days ago.
  • I just pulled the latest version and now it works! Thank you!
  • Nice to read that! :D
Sign In or Register to comment.