I am trying to use GVectorPackingConstants from RenderCore. I find that my game fails to link, with an undefined symbol:
1>Game.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) union __m128 const GVectorPackingConstants" (__imp_?GVectorPackingConstants@@3T__m128@@B)
I am presuming that the definition (which is in RenderUtils.cpp) needs imported in a dll somehow. I believe I have to edit my UDKRenderTest.Target.cs & UDKRenderTestEditor.Target.cs in order to import modules?
However if I add:
OutExtraModuleNames.AddRange(new string[] { "UDKRenderTest", "RenderCore" });
I still get the same link error.
If I take the definition from RenderUtils.cpp and place it directly into my game:
/** X=127.5, Y=127.5, Z=1/127.5f, W=-1.0 */
const VectorRegister GVectorPackingConstants = MakeVectorRegister( 127.5f, 127.5f, 1.0f/127.5f, -1.0f );
I then get the following compile error:
1> Game.cpp
1>C:\UDK\UDKRenderTest\MAIN\Source\UDKRenderTest\Game\Game.cpp(49): error C2491: 'GVectorPackingConstants' : definition of dllimport data not allowed
Which is due to the constant having to come from a .dll I think.
So I guess somehow I need to work out how to link, or dll load, RenderCore into my code so that I can get access to the GVectorPackingConstants which is used by VertexTangentZ and actually the function I want to call.
Some people have mentioned a build.cs file which I can’t find in my project anywhere just UDKRenderTest.Target.cs & UDKRenderTestEditor.Target.cs