Nebeor Posted October 22, 2019 Share Posted October 22, 2019 I tried to use VWTransform's void SetRotation(VWPoint3D newZ, VWPoint3D newY); Unfortunately the compiler complains with LNK2019: unresolved external symbol. I have encountered this bug earlier on, but strange enough, I succeeded yesterday to compile, but I was not able to do the same today. Am I the only one who has issues with this function? I cannot make sense out of this situation. Quote Link to comment
Nicolas Goutte Posted October 22, 2019 Share Posted October 22, 2019 VW SDK 2015? I cannot remember having such a problem back then. Does it compile when you rebuild everything but not when you compile it thereafter? Or vice-versa? Can you post the complete LNK 2019 error? I would like to see if the C++ mangled name correspond to the signature. Quote Link to comment
Nebeor Posted October 22, 2019 Author Share Posted October 22, 2019 Here you have the complete error: Error LNK2019 unresolved external symbol "public: void __cdecl VWFC::Math::VWTransformMatrix::SetRotation(class VWFC::Math::VWPoint3D,class VWFC::Math::VWPoint3D)" (?SetRotation@VWTransformMatrix@Math@VWFC@@QEAAXVVWPoint3D@23@0@Z) referenced in function "public: bool __cdecl NotRelevant::NotRelevantMethod(double &,double &,double &,double &,double &,double &,double &,bool &,char * * &,bool)" (?NotRelevantMethod@NotRelevant@@QEAA_NAEAN000000AEA_NAEAPEAPEAD_N@Z) Quote Link to comment
Nicolas Goutte Posted October 22, 2019 Share Posted October 22, 2019 Thank you! Everything seems to be correct. 1 Quote Link to comment
Nicolas Goutte Posted October 22, 2019 Share Posted October 22, 2019 However I am checking the VWSDK 2016 (the oldest I have still available here) VWTransformMatrix.h seems to declare that function, but I cannot find a definition for it, neither inline in VWTransformMatrix.h nor in VWTransformMatrix.cpp. I suppose that it was already the case in 2015. It seems to be still the case in 2020 (even if there is a function more, but that exact signature is still only declared not defined.) Therefore I suppose that you will have to compute your rotation another way, for example using matrix multiplication. Quote Link to comment
Nebeor Posted October 22, 2019 Author Share Posted October 22, 2019 (edited) void SetRotationMat(VWTransformMatrix& matrix, VWPoint3D& normal) { double phi = atan(normal.y / normal.x) * kDegreesPerRadian; double theta = acos(normal.z / 1) * kDegreesPerRadian); matrix.RotateZBefore(phi); matrix.RotateYBefore(theta); } I made this workaround, it works for me! Edited November 18, 2019 by Nebeor Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.