VS 2015 Linker Error
Posted: Tue Jun 02, 2020 9:07 pm
Hi
I've downloaded bullet version 2.88 and used the batch file (build_visual_studio_without_pybullet_vr) after changing vs2010 to vs2015 and also needed to change the premake4.lua file in bullet3-2.88\test\GwenOpenGLTest because I received this error; Error: invalid value 'Unicode' for flags
I could then open the 0_Bullet3Solution solution in VS 2015 and build it. I could run the Examples Browser as well.
Next I wanted to create my own project. So, I would create a New Project (Win 32 Console Application) and write a minimal code as below:
#include "stdafx.h"
#include "stdafx.h"
#include "btBulletDynamicsCommon.h"
int _tmain(int argc, _TCHAR* argv[]) {
btBoxShape * box = new btBoxShape(btVector3(1, 1, 1));
delete box;
return 0;
}
To add libraries, I do the following three steps:
1. Right click the Solution>Add Existing Project and select BulletDynamics, Bullet3Collision and LinearMath and then for my project right click on References>Add Reference and select the three of them
2. Right click my project>Properties and in Configuration Properties>C/C++>General>Additional Include Directories>bullet3-2.88\src directory is added (I've made sure All Configurations option is selected)
3. Right click my project>Properties and in Configuration Properties>Linker>Input>Additional Dependencies>BulletDynamics.lib, LinearMath.lib and Bullet3Collision.lib are added with absolute path (I've made sure All Configurations option is selected)
When I try to build it (release) in VS 2015, I get the following error which I know is a linker error but I don't know how to resolve it:
Error LNK2001 unresolved external symbol "public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)
Any guidance on possible source of problem is appreciated.
I've downloaded bullet version 2.88 and used the batch file (build_visual_studio_without_pybullet_vr) after changing vs2010 to vs2015 and also needed to change the premake4.lua file in bullet3-2.88\test\GwenOpenGLTest because I received this error; Error: invalid value 'Unicode' for flags
I could then open the 0_Bullet3Solution solution in VS 2015 and build it. I could run the Examples Browser as well.
Next I wanted to create my own project. So, I would create a New Project (Win 32 Console Application) and write a minimal code as below:
#include "stdafx.h"
#include "stdafx.h"
#include "btBulletDynamicsCommon.h"
int _tmain(int argc, _TCHAR* argv[]) {
btBoxShape * box = new btBoxShape(btVector3(1, 1, 1));
delete box;
return 0;
}
To add libraries, I do the following three steps:
1. Right click the Solution>Add Existing Project and select BulletDynamics, Bullet3Collision and LinearMath and then for my project right click on References>Add Reference and select the three of them
2. Right click my project>Properties and in Configuration Properties>C/C++>General>Additional Include Directories>bullet3-2.88\src directory is added (I've made sure All Configurations option is selected)
3. Right click my project>Properties and in Configuration Properties>Linker>Input>Additional Dependencies>BulletDynamics.lib, LinearMath.lib and Bullet3Collision.lib are added with absolute path (I've made sure All Configurations option is selected)
When I try to build it (release) in VS 2015, I get the following error which I know is a linker error but I don't know how to resolve it:
Error LNK2001 unresolved external symbol "public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)
Any guidance on possible source of problem is appreciated.