Adding new class in Visual C++ linkage issue

Post Reply
andreivu
Posts: 2
Joined: Mon Oct 13, 2014 8:20 pm

Adding new class in Visual C++ linkage issue

Post by andreivu »

I'm trying to create a new solver inherited from btSequentialImpulseConstraintSolver. In BulletDynamics folder I've added a new folder. To save time I've copied btMLCPSolver files to the new folder and renamed corresponding files and class names/variables. Next, in solution explorer in VC++ I've added these files to BulletDynamics project. Whenever I try to rebuild the project, I get errors that none of the classes used in my new class are not available. All the properties of the new class and the contents of the files are exactly the same as btMLCPSolver (except for the names of course). Are there any additional settings I need to apply somewhere so that all the classes used in my new class become available?

UPD: if I use include "#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" everything compiles. However I'd still want to know how come btMLCPSolver compiles without the same include.
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: Adding new class in Visual C++ linkage issue

Post by Basroil »

andreivu wrote:UPD: if I use include "#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" everything compiles. However I'd still want to know how come btMLCPSolver compiles without the same include.
Simple: It doesn't! :roll:

Here's the code from btMLCPSolver.h:

Code: Select all

#ifndef BT_MLCP_SOLVER_H
#define BT_MLCP_SOLVER_H

#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
#include "LinearMath/btMatrixX.h"
#include "BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h"
It includes SI files right there in the first real line of code.
andreivu
Posts: 2
Joined: Mon Oct 13, 2014 8:20 pm

Re: Adding new class in Visual C++ linkage issue

Post by andreivu »

Basroil, you are right.
It's a big surprise for me how this line disappeared from my new class..
Thanks for your reply
Post Reply