Game Development Community

Build Errors LNK2019 when using VS2013 and T3D Empty Template

by Charlie Barkley · in Torque 3D Beginner · 07/10/2016 (11:28 am) · 6 replies

When I follow the instruction in the tutorial I fail compiling the "<projectname> DLL" project because of the following error:

Quote:Fehler 133 error LNK1120: 1 unresolved external symbol C:...Torque3DMy ProjectsTutorialgameTutorial_DEBUG DLL.dll Tutorial DLL


Quote: Fehler 132 error LNK2019: unresolved external symbol ""public: void __thiscall Component::setOwner(class Entity *)" (?setOwner@Component@@QAEXPAVEntity@@@Z)" in Funktion ""public: bool __thiscall Entity::addComponent(class Component *)" (?addComponent@Entity@@QAE_NPAVComponent@@@Z)". C:...Torque3DMy ProjectsTutorialbuildFilesVisualStudio 2012projectsentity.obj Tutorial DLL

When I look for entity.obj it is NOT within the path given at the second error message it is withing the build dist directory:
Quote:C:...Torque3DMy ProjectsTutorialbuildFilesLinkVC2010.Debug.Win32Tutorial DLLentity.obj

I really tried a lot like comping with vs110 instead of 2013's vs120 and using another template project from the project manager - but always the same issues. I really want to get started but this blocks me for two days now :(

#1
07/10/2016 (11:57 am)
Excuse me , Im not a programmer , but since noone has offered any answer yet . Could it be possible that it needs to be in that directory ? I cant imagine why it would be looking there ?
BTW i tried for like 2 years to get the speedometer to work SOOOO...
#2
07/12/2016 (10:03 am)
This is a Link error, meaning a function is defined in the *.h file but not declared in in the *.cpp file. Either setOwner or addComponent are not declared in the *.cpp file or are missing all together.

Use Find in VS2012 to search for setOwner and addComponent. There has to be two declarations of each.

For example:
void setOwner in Component.h -- and --

void Component::setOwner(...)
{
//body
} in Component.cpp.

Same for addComponent in Entity.h and Entity.cpp.

Like James Burch said, the functions could also be missing because one of the files is not part of the project.
#3
07/28/2016 (1:53 am)
Hi,

I had the same issue and to fix it, I created folder components at Project DLL -> Source Files -> Engine -> T3D and added existing files component.cpp, component.h from the directory Torque3D-3.9\Engine\source\T3D\components.

btw I used VS2015 community.

#4
07/29/2016 (9:41 am)
Please follow this guides for the new T3D v3.9 and beyond

www.garagegames.com/community/forums/viewthread/143332
#5
07/29/2016 (9:53 am)
To my knowledge old versions prior to vs2015 are not supported for the new release of torque 3d v3.9, so please follow that guide above, BTW you not necessary need to compile at least you need program the engine in C++
#6
08/01/2016 (6:00 pm)
Hey guys, looks like we were a little unclear on this. I'll make sure to update the release posts to reflect it, but the current version of the Project Manager is considered obsolete and not recommended. It can be tweaked to work, but it will have some issues out of the box with filtering out some files.

The preferred platform to build the projects at the moment is CMake. Going forward for 4.0, we're working on a brand-new Project Manager to replace the old one, but it's not ready as for 3.9.

The recommended versions of Visual Studio are 2013 and 2015.