Unresolved Externals when using HashMap [Resolved]
by Alex Poli · in Torque 2D Professional · 02/07/2014 (3:22 pm) · 2 replies
I have recently been trying to use a HashMap object to get information about different points around my map. Unfortunately I keep getting the following error:
Right now my implementation looks like the following:
What I am wondering is if this is a problem with the engine or with how I am using the HashMap.
Error 2 error LNK2019: unresolved external symbol "protected: __thiscall ConsoleObject::ConsoleObject(class ConsoleObject const &)" (??0ConsoleObject@@IAE@ABV0@@Z) referenced in function "public: __thiscall SimObject::SimObject(class SimObject const &)" (??0SimObject@@QAE@ABV0@@Z) C:UsersAlexTorque2dTorque2DenginecompilersVisualStudio 2012MapGeneration.obj Torque2D Error 3 error LNK1120: 1 unresolved externals C:UsersAlexDocumentsLightTorque2D.exe Torque2D
Right now my implementation looks like the following:
HashMap<Point2D, SimObject> vertLookup; Point2D vertPoint; // ... //code that does stuff with tmpVert[] SimObject and xValues and yValues // ... vertPoint.x = xValues[i]; vertPoint.y = yValues[i]; vertLookup.insert(vertPoint, tmpVert[i]);
What I am wondering is if this is a problem with the engine or with how I am using the HashMap.
About the author
Associate James Urquhart
Instead it is a better idea to use either SimObject* or if you want to use reference counting, a variant of SimObjectPtr.