Unresolved external with renderglobals.h on msvc


#1

When I try to use the constants defined in renderglobals.h in a component in a custom module the linker generates unresolved external errors about these constants on MSVC. I suspect it might have something to do with the NAPAPI macro not working properly for these kind of external constants.


#2

Hey, this is indeed correct, but has nothing to do with the NAPAPI macro, which is correct. The constants are not exported in the CPP, which is most likely the cause of the unresolved symbol. Which constants do you want to use?


#3

It’s about projectionMatrixUniform, viewMatrixUniform and modelMatrixUniform in renderglobals.h/cpp


#4

Right, yes, they can be used internally in the render module but because the definition is not exported it fails to resolve when referenced outside the dll. I think it makes more sense to wrap a function around them. Will add a ticket for this.