Trying to build on macOS, but get 'assert.h' file not found

Here is a full error

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cassert:20:10: fatal error: 'assert.h' file not found
#include <assert.h>
         ^~~~~~~~~~
1 error generated.
CMake Error at cmake/Modules/UrhoCommon.cmake:1289 (message):
  Could not generate dependency list for PCH.  There is something wrong with
  your compiler toolchain.  Ensure its bin path is in the PATH environment
  variable or ensure CMake can find CC/CXX in your build environment.
Call Stack (most recent call first):
  Source/Urho3D/CMakeLists.txt:408 (enable_pch)

Command line tools installed.

You may want to check this post. MacOS can’t use the pre-compiled header (PCH).

1 Like

Ok this helped, but after I run make, get this error at 92%

/GameEngines/Urho3D_repo/Source/ThirdParty/Assimp/contrib/zlib/gzlib.c:252:9: error: 
      implicit declaration of function 'lseek' is invalid in C99

Maybe I don’t need to compile the engine in the first place? Have never done this before.

Edit: see this. Building things on mac is always a hack-a-thon…

You have to go into the file at /GameEngines/Urho3D_repo/Source/ThirdParty/Assimp/contrib/zlib/gzguts.h (not gzlib.c) and include #include <unistd.h>

1 Like

Finally! Thanks you really helped)

1 Like