0

I'm porting one of my project to iOS, but I have a problem:

Undefined symbols for architecture armv7:
"typeinfo for btRaycastVehicle", referenced from:
  typeinfo for OgreVehicle in OgreVehicle.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My OgreVehicle.hpp:

#ifndef _OGREVEHICLE_H_
#define _OGREVEHICLE_H_

#include "BulletDynamics/Dynamics/btRigidBody.h"
#include "BulletDynamics/Vehicle/btVehicleRaycaster.h"
#include "BulletDynamics/Vehicle/btWheelInfo.h"
#include "BulletDynamics/Vehicle/btRaycastVehicle.h"

#include "Ogre.h"

class OgreVehicle : public btRaycastVehicle{
public:
OgreVehicle(const btVehicleTuning& tuning,btRigidBody* chassis, btVehicleRaycaster*,raycaster ,btScalar idleRPM = 500, btScalar maxRPM = 6000);

virtual void updateVehicle(btScalar step);

btWheelInfo &addWheel(Ogre::SceneNode* node, const btVector3& connectionPointCS0, const btVector3& wheelDirectionCS0,const btVector3& wheelAxleCS,btScalar suspensionRestLength,btScalar wheelRadius,const btVehicleTuning& tuning, bool isFrontWheel);

Ogre::SceneNode* wheelNodes[4];

//Engine related stuff
btScalar currentRPM;
btScalar maxRPM;
btScalar idleRPM;

private:

btScalar currentEngineForce;
btScalar maxEngineForce;

};

#endif

I've added the Bullet Xcode projects and dependencies to my projects, also added the builds and links to my build phases.

Any idea what should I do to solve the problem?

Thank you in advance!

EDIT

The problem will be the virtual function, it overrides the btRaycastVehicle's updateVehicle virtual function. The strange fact: It works on windows with VS11.

djromero
  • 19,551
  • 4
  • 71
  • 68
kennyevo
  • 683
  • 4
  • 24
  • The error message from the linker tells you precisely what you need to know: The library you linked against doesn't have ARMv7 code in it - perhaps because it's not a FAT library supporting iOS. There might well be separate binaries. You deduction about the virtual function is simply that by overriding them you are pulling in symbols for the base-classes v-table and typeinfo. – marko Dec 29 '13 at 19:23
  • I've set up my project as described here: [link](http://www.raywenderlich.com/53077/bullet-physics-tutorial-getting-started) The tutorial builds and works on both simulator and device. – kennyevo Dec 29 '13 at 19:34

0 Answers0