john-chapman / im3d

Immediate mode rendering and 3d gizmos.
MIT License
1.21k stars 63 forks source link

Build Error on Ubuntu 16.04 #25

Closed deep-programmer closed 5 years ago

deep-programmer commented 6 years ago

Hi,

Running premake4, for one of the examples, with following command: premake4 --file=premake.lua gives the following error: im3d/examples/OpenGL33/premake.lua:4: attempt to call global 'filter' (a nil value)

On the other hand, running make directly gives following error: ` ==== Building im3d_opengl33 (debug_win32) ==== Creating obj/Win32/Debug glew.c im3d_example.cpp In file included from ../../common/im3d_example.cpp:1:0: ../../common/im3d_example.h:33:3: error: #error im3d: Platform not defined

error im3d: Platform not defined

^ In file included from ../../common/im3d_example.h:102:0, from ../../common/im3d_example.cpp:1: /usr/include/c++/5/cstdlib:41:28: fatal error: bits/c++config.h: No such file or directory compilation terminated. im3d_opengl33.make:191: recipe for target 'obj/Win32/Debug/im3d_example.o' failed make[1]: [obj/Win32/Debug/im3d_example.o] Error 1 Makefile:34: recipe for target 'im3d_opengl33' failed make: [im3d_opengl33] Error 2 `

I am running above on Ubuntu 16.04 (Linux)

Could you please help resolve the issue with premake4 or include an alternate easy way to build on Linux, e.g. using CMake ?

john-chapman commented 6 years ago

Hi, thanks for raising this issue. Actually the premake script requires premake5 - I'll rename it to make that more clear.

Re the compile error: actually the examples are only implemented on Windows right now; so far it hasn't been a big priority to add an implementation for other platforms. I agree it would be useful, but I'm not sure exactly when I'll get around to it. Of course someone with some Linux/OGL experience and a bit of time might like to help out with that ;)