Nopengl.h can't be found


#1

Hi,

I created a user module that depends on mod_naprender and then created a new component. I included renderablemeshcomponent.h as RenderableMeshComponent is a dependency. However the compiler complains it cannot find nopengl.h that is includer renderservice.h. I am on OSX. Did I omit something? Or is this a known issue and is there a workaround?

Thanks!

Stijn.


#2

I figured out a bit more… The problem starts occurring when my project depends on TWO user modules that both depend on mod_naprender. As soon as I only have one user module it works fine. @chris would you have any ideas?


#3

Damn, that sounds a little broken. I’d have to have a look into it and I can’t jump on it right now but potentially can later in the week.

Do you have a workaround though or are you blocked?


#4

@chris Yeah, unfortunately there is no viable workaround, so it’s completely blocking development on our current project.

It means that there is no way to use more than one module at a time if they happen to have overlapping dependencies (which is not uncommon).


#5

For a possible work-around, can you let the two user modules depend on each other? I believe Marcel ran into a similar issue and resolved it that way.

So: USERMOD_A depends on mod_naprender and USERMOD_B depends on USERMOD_A . This way both modules have access to the header files and are correctly linked.


#6

see: Header file include issues

especially:

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.

It is indeed an annoying bug that should be resolved @chris


#7

Agreed. I believe this potentially been triggered by those module inter-dependencies changes made in the last few months.

@steveb please let us know if you have success with the suggested workaround!


#8

@cklosters Hmm this approach seems to lead to an infinite loop when I run ./regenerate on the project.


#9

So your project (the app) depends on ModuleB, ModuleB depends on ModuleA, ModuleA depends on mod_naprender. Does this create an infinite loop? Infinite loop should only occur when modules link to each other.

What I am suggesting is to make sure only 1 of your user modules depends on mod_naprender.


#10

@steveb It looks like I’ll have a better fix for this in 10 minutes, I’m just running it through a bit more testing. If you’re still working on rearranging your dependencies I’d give that a break.


#11

Sorry, this part confused me, since it stated that they most both depend on each other. What you are saying might well work, then. We have mashed the two modules together for now, but we will need to separate them out again soon as this issue is properly fixed.


#12

OK @steveb , so within your framework release:

  • Replace modules/mod_naprender/module_extra.cmake with this file
  • Replace cmake/nrender.cmake with this file

Then revert any module inter-dependency changes you made to try and work around the issue.

These or similar changes will be included in an upcoming framework release.

Let me know if it doesn’t resolve things :slightly_smiling_face:


Header file include issues