i tried to complete this tutorial to create a test app with bullet physics. I followed every step and did not change anything else. OS is Windows 8.1 (64bit), Visual Studio 2013. When i try to Debug or Release i get the following error:
BulletTestApp.cpp
#include "stdafx.h"
#include "btBulletDynamicsCommon.h"
int _tmain(int argc, _TCHAR* argv[])
{
btBoxShape* box = new btBoxShape(btVector3(1, 1, 1));
return 0;
}
Debug
1>BulletTestApp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z)" in Funktion ""public: static void * __cdecl btBoxShape::operator new(unsigned int)" (??2btBoxShape@@SAPAXI@Z)".
1>BulletTestApp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z)" in Funktion ""public: static void __cdecl btBoxShape::operator delete(void *)" (??3btBoxShape@@SAXPAX@Z)".
1>BulletTestApp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)" in Funktion "_wmain".
Release
1>BulletTestApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z)".
1>BulletTestApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z)".
1>BulletTestApp.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)"
while "Nicht aufgelöstes externes Symbol" is "unresolved external symbol". How can i fix this issue?
This error means that the functions (eg.
btAlignedAllocInternal(...)
) is found in the header, but no implementation (source code) was found. You either need the.lib
or the.dll
(or maybe the.cpp
file) which implements this functions. This file must be in a folder known to your project. The linker can not find these files, so your linker errors occur. The following post might help: How to link a DLL in Visual StudioEdit: You should try the shipped Visual Studio Project which contains all configuration properly: ...\bullet-2.81-rev2613\build\vs2010. VS 2013 automatically imports this to the newer version.