I am try to create character control using suche code
btTransform startTransform;
startTransform.setIdentity ();
//startTransform.setOrigin (btVector3(0.0, 4.0, 0.0));
const Vector3 &postion = cameraNode->GetWorldPosition();
startTransform.setOrigin (btVector3(postion.x, postion.y_, postion.z_));
ghostObject = new btPairCachingGhostObject();
ghostObject->setWorldTransform(startTransform);
btScalar characterHeight=1.75;
btScalar characterWidth =1.75;
ghostShape = new btCapsuleShape(characterWidth,characterHeight);
ghostObject->setCollisionShape (ghostShape);
ghostObject->setCollisionFlags (btCollisionObject::CF_CHARACTER_OBJECT);
btScalar stepHeight = btScalar(0.35);
characterController = new btKinematicCharacterController (ghostObject,ghostShape,stepHeight);
when compiling it with Clion i got following linking error
CMakeFiles\LoadScene.dir/objects.a(CharacterComponent.cpp.obj): In function btAlignedAllocator<int, 16u>::deallocate(int*)': C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/LinearMath/btAlignedAllocator.h:96: undefined reference to
btAlignedFreeInternal(void*)‘
CMakeFiles\LoadScene.dir/objects.a(CharacterComponent.cpp.obj): In function btAlignedAllocator<btHashInt, 16u>::deallocate(btHashInt*)': C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/LinearMath/btAlignedAllocator.h:96: undefined reference to
btAlignedFreeInternal(void*)‘
CMakeFiles\LoadScene.dir/objects.a(CharacterComponent.cpp.obj): In function btAlignedAllocator<btTriangleInfo, 16u>::deallocate(btTriangleInfo*)': C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/LinearMath/btAlignedAllocator.h:96: undefined reference to
btAlignedFreeInternal(void*)‘
CMakeFiles\LoadScene.dir/objects.a(CharacterComponent.cpp.obj):CharacterComponent.cpp:(.rdata$_ZTV17btTypedConstraint[_ZTV17btTypedConstraint]+0x60): undefined reference to btTypedConstraint::serialize(void*, btSerializer*) const' CMakeFiles\LoadScene.dir/objects.a(CharacterControl.cpp.obj): In function
btCollisionObject::operator new(unsigned long long)’:
C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/BulletCollision/CollisionDispatch/btCollisionObject.h:129: undefined reference to btAlignedAllocInternal(unsigned long long, int)' CMakeFiles\LoadScene.dir/objects.a(CharacterControl.cpp.obj): In function
CharacterControl::CharacterControl(Urho3D::Context*, Urho3D::Scene*)’:
C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/BulletCollision/CollisionDispatch/btCollisionObject.h:129: undefined reference to btPairCachingGhostObject::btPairCachingGhostObject()' CMakeFiles\LoadScene.dir/objects.a(CharacterControl.cpp.obj): In function
btCapsuleShape::operator new(unsigned long long)’:
C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/BulletCollision/CollisionShapes/btCapsuleShape.h:37: undefined reference to btAlignedAllocInternal(unsigned long long, int)' CMakeFiles\LoadScene.dir/objects.a(CharacterControl.cpp.obj): In function
CharacterControl::CharacterControl(Urho3D::Context*, Urho3D::Scene*)’:
C:/3d/Urho3D.git/samples/LoadScene/CharacterControl.cpp:21: undefined reference to btCapsuleShape::btCapsuleShape(float, float)' CMakeFiles\LoadScene.dir/objects.a(CharacterControl.cpp.obj): In function
btKinematicCharacterController::operator new(unsigned long long)’:
C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/BulletDynamics/Character/btKinematicCharacterController.h:118: undefined reference to btAlignedAllocInternal(unsigned long long, int)' CMakeFiles\LoadScene.dir/objects.a(CharacterControl.cpp.obj): In function
CharacterControl::CharacterControl(Urho3D::Context*, Urho3D::Scene*)’:
C:/3d/Urho3D.git/samples/LoadScene/CharacterControl.cpp:26: undefined reference to btKinematicCharacterController::btKinematicCharacterController(btPairCachingGhostObject*, btConvexShape*, float, btVector3 const&)' CMakeFiles\LoadScene.dir/objects.a(CharacterControl.cpp.obj): In function
btCollisionObject::operator delete(void*)’:
C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/BulletCollision/CollisionDispatch/btCollisionObject.h:129: undefined reference to btAlignedFreeInternal(void*)' CMakeFiles\LoadScene.dir/objects.a(CharacterControl.cpp.obj): In function
btCapsuleShape::operator delete(void*)’:
C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/BulletCollision/CollisionShapes/btCapsuleShape.h:37: undefined reference to btAlignedFreeInternal(void*)' CMakeFiles\LoadScene.dir/objects.a(CharacterControl.cpp.obj): In function
btKinematicCharacterController::operator delete(void*)’:
C:/3d/Urho3D.git/Urho3D-SDK-Shared/include/Urho3D/ThirdParty/Bullet/BulletDynamics/Character/btKinematicCharacterController.h:118: undefined reference to `btAlignedFreeInternal(void*)'
collect2.exe: error: ld returned 1 exit status
CMakeFiles\LoadScene.dir\build.make:151: recipe for target ‘bin/LoadScene_d.exe’ failed
mingw32-make.exe[3]: *** [bin/LoadScene_d.exe] Error 1
mingw32-make.exe[2]: *** [CMakeFiles/LoadScene.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles/LoadScene.dir/rule] Error 2
CMakeFiles\Makefile2:66: recipe for target ‘CMakeFiles/LoadScene.dir/all’ failed
CMakeFiles\Makefile2:78: recipe for target ‘CMakeFiles/LoadScene.dir/rule’ failed
Makefile:163: recipe for target ‘LoadScene’ failed
mingw32-make.exe: *** [LoadScene] Error 2
any idea what can case this ?