Compilation error with Codeblocks (Linux)

When I am building a Codeblocks project (generated by the “Linux (C)”-target from Armory) on Linux I am getting this error:
/armsdk/Kha/Kinc/Backends/Graphics4/OpenGL/Sources/kinc/backend/graphics4/ogl.h|39|fatal error: GL/gl.h: file or directory not found|

and Codeblocks highlights this line: #include "GL/gl.h"

The same happens with Vulkan as the Graphics API.

Although the files aren’t missing.

Linux HL never worked for me, since i joined this forum. If you use Linux Krom instead, you will save time.

Looks like an issue with Kinc, if possible, could you (or anyone who can reproduce this issue) try to compile one of the Kinc sample projects with Kinc/make -g opengl using a fresh git clone from the repository in my first link and then build it with Codeblocks? If it also happens with these samples you should report it as a Kinc issue.

I don’t have git on my PC and if I download the files as a zip folder from GitHub then the folders with an @ symbol don’t get included in the download.

If you don’t want to use Git or a Github client to get the submodules (the @ folders), you can simply go to those @ folders and download their contents separately and manually place them in the original / empty folders.

I made what was in the post.

The Kinc/make -g opengl command was successful, but the same “file not found” error occured when I compiled the project<-(output from command) with codeblocks.

/Shader-Kinc/Kinc/Backends/Graphics4/OpenGL/Sources/kinc/backend/graphics4/ogl.h|37|fatal error: GL/gl.h: file or directory not found|

I had the same problem and after a few hours of messing around, I got my project running on Ubuntu. First, you need to install the dependencies listed here: Linux · Kode/Kha Wiki · GitHub . That didn’t quite get things running for me, so I had to add -lm -lstdc++ to the linker settings in CodeBlocks. Hope this helps someone.

Nice try. Did not work for me. Same error when using make and using Code:Blocks

In file included from …/…/…/…/…/ArmorySDK2212/Kha/Backends/Kinc-HL/kinc-bridge/bridge.c:1:
…/…/…/…/…/ArmorySDK2212/Kha/Backends/Kinc-HL/kinc-bridge/arrays.c.h: In function ‘hl_kinc_bytearray_setint16_le’:
…/…/…/…/…/ArmorySDK2212/Kha/Backends/Kinc-HL/kinc-bridge/arrays.c.h:115:34: error: lvalue required as unary ‘&’ operand
115 | int8_t *data = (int8_t *)&((int16_t)value);
| ^
…/…/…/…/…/ArmorySDK2212/Kha/Backends/Kinc-HL/kinc-bridge/arrays.c.h: In function ‘hl_kinc_bytearray_setuint16_le’:
…/…/…/…/…/ArmorySDK2212/Kha/Backends/Kinc-HL/kinc-bridge/arrays.c.h:121:34: error: lvalue required as unary ‘&’ operand
121 | int8_t *data = (int8_t *)&((uint16_t)value);
| ^
…/…/…/…/…/ArmorySDK2212/Kha/Backends/Kinc-HL/kinc-bridge/arrays.c.h: In function ‘hl_kinc_bytearray_setint32_le’:
…/…/…/…/…/ArmorySDK2212/Kha/Backends/Kinc-HL/kinc-bridge/arrays.c.h:127:34: error: lvalue required as unary ‘&’ operand
127 | int8_t *data = (int8_t *)&((int32_t)value);
| ^
…/…/…/…/…/ArmorySDK2212/Kha/Backends/Kinc-HL/kinc-bridge/arrays.c.h: In function ‘hl_kinc_bytearray_setuint32_le’:
…/…/…/…/…/ArmorySDK2212/Kha/Backends/Kinc-HL/kinc-bridge/arrays.c.h:133:34: error: lvalue required as unary ‘&’ operand
133 | int8_t *data = (int8_t *)&((uint32_t)value);
| ^
make: *** [makefile:428: bridge.o] Error 1