Problem Adding library to Visual Studio Project

Dracmore
Posts: 3
Joined: Sun Nov 10, 2013 11:22 am

Problem Adding library to Visual Studio Project

Post by Dracmore »

Hi all!

First of all, I apologize for destroy your language.

I'm trying to add Bullet to my Visual Studio project. If I follow each step and add visual studio projects (BulletCollision, BulletDynamics and LinearMath), I don't have any problem. But i don't want to add those projects for structure reasons, for that I'm trying to include src folder and .lib files compiled before. It is that possible or i have to add those projects?

i don't know if you know what i mean, basically, i want to avoid those projects and just add necessary files.

For now, i'm getting errors about RuntimeLibrary, 'MTd_StaticDebug' do not match 'MDd_DynamicDebug', etc...


Thanks :D
Dracmore
Posts: 3
Joined: Sun Nov 10, 2013 11:22 am

Re: Problem Adding library to Visual Studio Project

Post by Dracmore »

Well, now I'm getting the following error:

Code: Select all

Error	4	error LNK1120: 3 externos sin resolver	c:\path\visual studio 2013\Projects\ConsoleApplication2\Debug\ConsoleApplication2.exe	1	1	ConsoleApplication2
Error	3	error LNK2019: símbolo externo "public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z) sin resolver al que se hace referencia en la función _wmain	c:\path\visual studio 2013\Projects\ConsoleApplication2\ConsoleApplication2\ConsoleApplication2.obj	ConsoleApplication2
Error	1	error LNK2019: símbolo externo "void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z) sin resolver al que se hace referencia en la función "public: static void * __cdecl btBoxShape::operator new(unsigned int)" (??2btBoxShape@@SAPAXI@Z)	c:\path\visual studio 2013\Projects\ConsoleApplication2\ConsoleApplication2\ConsoleApplication2.obj	ConsoleApplication2
Error	2	error LNK2019: símbolo externo "void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z) sin resolver al que se hace referencia en la función "public: static void __cdecl btBoxShape::operator delete(void *)" (??3btBoxShape@@SAXPAX@Z)	c:\path\visual studio 2013\Projects\ConsoleApplication2\ConsoleApplication2\ConsoleApplication2.obj	ConsoleApplication2
And I'm just trying the following code:

Code: Select all

#include "stdafx.h"
#include "btBulletDynamicsCommon.h"

int _tmain(int argc, _TCHAR* argv[])
{
	btBoxShape * box = new btBoxShape(btVector3(1, 1, 1));
	delete box;
	return 0;
}
Is in spanish, I don't know if you understand that, but maybe the problem is clear. I can translate if it isn't clear.
Dracmore
Posts: 3
Joined: Sun Nov 10, 2013 11:22 am

Re: Problem Adding library to Visual Studio Project

Post by Dracmore »

Well, it is working! xD

I erased all and started again. First of all I added src folder and, instead of adding lib folder, I added the necessary lib sources directly. I think i already did that but maybe I messed up all before.

Thanks!