AFX 3.8 Porting - Strange Build Errors

Expanding and utilizing the engine via C++.
26 posts Page 1 of 3
Steve_Yorkshire
Posts: 330
Joined: Tue Feb 03, 2015 10:30 pm
 
  by Steve_Yorkshire » Sun Nov 15, 2015 10:32 pm
I've been porting AFX from 3.6.3 to 3.8 and hit some strange build errors. There's a few "uses undefined struct" and "cannot convert" errors relating to 5 of the AFX files but the errors reference console.h rather than lines in the AFX code. I'm a bit confused and at a loss what to do.

Here's a pic (right click -> view) for full size
Image

And here's the output
1>------ Build started: Project: AFXtest DLL, Configuration: Release Win32 ------
1>  afxEA_AreaDamage.cpp
1>  afxEA_CollisionEvent.cpp
1>  afxEA_StaticShape.cpp
1>  afxGuiSubstitutionField.cpp
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper<A>'
1>          with
1>          [
1>              A=GameBaseData *
1>          ] (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp)
1>          ..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp(212) : see reference to function template instantiation 'ConsoleValueRef Con::executef<GameBaseData*,const char*,const char*,const char*,char*,const char*,char*>(A,B,C,D,E,F,G)' being compiled
1>          with
1>          [
1>              A=GameBaseData *
1>  ,            B=const char *
1>  ,            C=const char *
1>  ,            D=const char *
1>  ,            E=char *
1>  ,            F=const char *
1>  ,            G=char *
1>          ]
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2440: 'initializing' : cannot convert from 'GameBaseData *' to 'int' (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp)
1>          There is no context in which this conversion is possible
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp)
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(887): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper<A>'
1>          with
1>          [
1>              A=ShapeBase *
1>          ] (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp)
1>          ..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp(227) : see reference to function template instantiation 'ConsoleValueRef Con::executef<ShapeBase*,const char*,const char*,char*,char*,const char*>(A,B,C,D,E,F)' being compiled
1>          with
1>          [
1>              A=ShapeBase *
1>  ,            B=const char *
1>  ,            C=const char *
1>  ,            D=char *
1>  ,            E=char *
1>  ,            F=const char *
1>          ]
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(887): error C2440: 'initializing' : cannot convert from 'ShapeBase *' to 'int' (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp)
1>          There is no context in which this conversion is possible
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(887): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ea\afxEA_AreaDamage.cpp)
1>  afxStatusBox.cpp
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(885): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper<A>'
1>          with
1>          [
1>              A=StaticShapeData *
1>          ] (..\..\..\..\..\Engine\source\afx\ea\afxEA_StaticShape.cpp)
1>          ..\..\..\..\..\Engine\source\afx\ea\afxEA_StaticShape.cpp(158) : see reference to function template instantiation 'ConsoleValueRef Con::executef<StaticShapeData*,const char*,const char*,StringTableEntry>(A,B,C,D)' being compiled
1>          with
1>          [
1>              A=StaticShapeData *
1>  ,            B=const char *
1>  ,            C=const char *
1>  ,            D=StringTableEntry
1>          ]
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(885): error C2440: 'initializing' : cannot convert from 'StaticShapeData *' to 'int' (..\..\..\..\..\Engine\source\afx\ea\afxEA_StaticShape.cpp)
1>          There is no context in which this conversion is possible
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(885): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ea\afxEA_StaticShape.cpp)
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(886): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper<A>'
1>          with
1>          [
1>              A=GuiInspector *
1>          ] (..\..\..\..\..\Engine\source\afx\ui\afxGuiSubstitutionField.cpp)
1>          ..\..\..\..\..\Engine\source\afx\ui\afxGuiSubstitutionField.cpp(202) : see reference to function template instantiation 'ConsoleValueRef Con::executef<GuiInspector*,const char*,StringTableEntry,StringTableEntry,const char*>(A,B,C,D,E)' being compiled
1>          with
1>          [
1>              A=GuiInspector *
1>  ,            B=const char *
1>  ,            C=StringTableEntry
1>  ,            D=StringTableEntry
1>  ,            E=const char *
1>          ]
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(886): error C2440: 'initializing' : cannot convert from 'GuiInspector *' to 'int' (..\..\..\..\..\Engine\source\afx\ui\afxGuiSubstitutionField.cpp)
1>          There is no context in which this conversion is possible
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(886): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ui\afxGuiSubstitutionField.cpp)
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper<A>'
1>          with
1>          [
1>              A=GameBaseData *
1>          ] (..\..\..\..\..\Engine\source\afx\ea\afxEA_CollisionEvent.cpp)
1>          ..\..\..\..\..\Engine\source\afx\ea\afxEA_CollisionEvent.cpp(179) : see reference to function template instantiation 'ConsoleValueRef Con::executef<GameBaseData*,StringTableEntry,const char*,const char*,const char*,char*,StringTableEntry>(A,B,C,D,E,F,G)' being compiled
1>          with
1>          [
1>              A=GameBaseData *
1>  ,            B=StringTableEntry
1>  ,            C=const char *
1>  ,            D=const char *
1>  ,            E=const char *
1>  ,            F=char *
1>  ,            G=StringTableEntry
1>          ]
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2440: 'initializing' : cannot convert from 'GameBaseData *' to 'int' (..\..\..\..\..\Engine\source\afx\ea\afxEA_CollisionEvent.cpp)
1>          There is no context in which this conversion is possible
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(888): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ea\afxEA_CollisionEvent.cpp)
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(883): error C2079: 'callback' uses undefined struct '_EngineConsoleExecCallbackHelper<A>'
1>          with
1>          [
1>              A=afxStatusBox *
1>          ] (..\..\..\..\..\Engine\source\afx\ui\afxStatusBox.cpp)
1>          ..\..\..\..\..\Engine\source\afx\ui\afxStatusBox.cpp(44) : see reference to function template instantiation 'ConsoleValueRef Con::executef<afxStatusBox*,const char*>(A,B)' being compiled
1>          with
1>          [
1>              A=afxStatusBox *
1>  ,            B=const char *
1>          ]
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(883): error C2440: 'initializing' : cannot convert from 'afxStatusBox *' to 'int' (..\..\..\..\..\Engine\source\afx\ui\afxStatusBox.cpp)
1>          There is no context in which this conversion is possible
1>C:/Torque/Torque3D_38_Win/test_afx/Engine/source/console/console.h(883): error C2059: syntax error : 'template' (..\..\..\..\..\Engine\source\afx\ui\afxStatusBox.cpp)
2>------ Build started: Project: AFXtest, Configuration: Release Win32 ------
2>LINK : fatal error LNK1181: cannot open input file 'C:\Torque\Torque3D_38_Win\test_afx\My Projects\AFXtest\game\AFXtest DLL.lib'
========== Build: 0 succeeded, 2 failed, 15 up-to-date, 0 skipped ==========
Any help appreciated. :?
Bloodknight
Posts: 242
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Mon Nov 16, 2015 3:43 am
J0linar
Posts: 46
Joined: Thu Feb 05, 2015 8:50 pm
by J0linar » Mon Nov 16, 2015 2:42 pm
my guess would be that you have to add an extra include since there where api changes introduced in the latest versions of T3D,

therefore include console/engineAPI.h/console.h in the files causing/having those errors,
this might solve most warnings but probably not all, i had the same issue when i tried to port gmk/verve (where i have to admit that i gave that endeavour up)..
Steve_Yorkshire
Posts: 330
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Mon Nov 16, 2015 4:47 pm
Adding engineAPI.h to arcaneFX.h threw up 122 "unresolved external symbols" relating to "onStaticModified".

Adding engineAPI.h individually to the 5 error files stopped the original errors, until all 5 files had it, then it threw the above 122 errors again.

Adding console/console.h had no effect on original errors.

I mostly code gameplay and new classes so this bit of the engine is rather baffling.

Also I notice Jeff had missed a few code comments so shockWaveData wasn't covered in his port, but it was easy to fix those errors.
J0linar
Posts: 46
Joined: Thu Feb 05, 2015 8:50 pm
by J0linar » Mon Nov 16, 2015 4:59 pm
Ye feel that, honestly am not able to port anything since those changes where introduced - that makes afx/verve/gm/guidebot and so on just useless

Would be nice if someone who has some actual knowledge would chime in to shed some light here
Azaezel
Posts: 464
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Mon Nov 16, 2015 8:11 pm
https://github.com/faustlogic/Torque3D-plus-AFX/pull/1 make no promises other than it compiles.
Also I notice Jeff had missed a few code comments so shockWaveData wasn't covered in his port, but it was easy to fix those errors.
Does not function. Was removed in devhead. That's why that played up.
Gibby
Posts: 72
Joined: Wed Feb 11, 2015 2:40 pm
by Gibby » Mon Nov 16, 2015 11:52 pm
[quote="Azaezel"]https://github.com/faustlogic/Torque3D-plus-AFX/pull/1 make no promises other than it compiles.

Had your earlier 3.7 version working fine - this one does compile but crashes here:

Code: Select all

GFXD3D9Shader::_compileShader - Error compiling shader: E_FAIL: An undetermined error occurred (80004005) C:/Torque/Torque3D-afx_plus_3.8/My Projects/test38/game/shaders/common/lighting/advanced/vectorLightP.hlsl(70,27): error X3004: undeclared identifier 'prepassUncondition' Failed to initialize material 'AL_VectorLightMaterial' c:\torque\torque3d-afx_plus_3.8\engine\source\materials\matinstance.cpp(525,0): {Fatal} - Not init'ed!
any ideas?
Azaezel
Posts: 464
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Tue Nov 17, 2015 12:05 am
https://github.com/Azaezel/Torque3D/blo ... P.hlsl#L70

Not offhand, but then, I've stuck to the regular full directory most times and thrown AFX bits in per-project... could be a script ref change... will poke as time allows... Which directory did you try as your baseline?
Gibby
Posts: 72
Joined: Wed Feb 11, 2015 2:40 pm
by Gibby » Tue Nov 17, 2015 12:18 am
Ahhh, found it, the 'Full_AFX' template hadn't been updated with newest shader stuff - diffing it with 'Full' made it work...

I'll bash away on it some more this eve, see if I can break anything else ;P
Azaezel
Posts: 464
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Tue Nov 17, 2015 12:20 am
Appreciate it. Been all over the place lately. Among other things.
26 posts Page 1 of 3

Who is online

Users browsing this forum: No registered users and 11 guests