Header file include issues



I ran into a problem with header file include issues. I think either Nap’s generate script or CMake got confused and things got screwed up. That, or the actual includes are wrong and just happen to work, usually…

I’m integrating the 4D engine with the Aura app. I’m not sure why, but somehow combining both the 4D engine’s mod_spatial and mod_aura created the issue.

See the attached diff with the fixes I needed to make. Seems like mod_naprender assumes ‘include/nrender’ to be in the search path, but for some reason it isn’t, and thus I had to apply the attached fixes.

Any ideas?

Marcelpatch.diff.zip (2.0 KB)


As far as I can tell, and I tested this recently using a new project build from package and the demos that ship with the package: all includes regarding nrender should never need the nap prefix, as they are bundled next to the nap directory.

What are you doing exactly? You are combining two apps into one? And are using a new generated project for that or something else? I can’t really jump to conclusions based on what you just told me.


I added this, to Aura’s project.json,

"version": "0.2.0",
"modules": [
	"mod_napaudio",        <--------
    "mod_napaudioadvanced" <--------
    "mod_spatial",         <--------
    "mod_nappython",       <--------
    "mod_naposc",          <--------

Contents of mod_spatial’s module.json,

"dependencies": [

Removed generated xcode project files, ran regenerate script, build from scratch. The problems began to manifest after this. Where does to include path to nrender come from?


I would add those dependencies to mod_aura, not the project file directly. The one in my repo looks currently like this:

    "dependencies": [

This module is linked into the aura project and therefore includes all those modules. You are also defining mod_napaudioadvanced twice, because you reference it in both the Aura json and the spatial module. From what I remember this should not cause any issues but sill, declaring it twice might result in strange side effects. Only mod_spatial uses audio right? Remove all audio references from the aura module and reference only mod_spatial in there, this will bring in all those dependencies.

Nopengl.h can't be found

Ah I see. I just copied it over from our 4D app, but I see now it uses a different structure, and all code (except main+app) are inside a module inside the app folder. I’ll put the references there instead of the main app and see if it works.


A fix for this issue is incoming in the next framework release.

Anybody who needs a solution more urgently can apply the changes as seen here.