These are the steps I took:
1. I've copied the camera sample project into a different name
2. I've deleted its content and replaced it with the following code:
//main.cpp
#define DARKSDK_COMPILE
#include "DarkSDK.h"
#include "ODEPhysics.h"
void DarkSDK ( void )
{
ODE_SetWorldGravity(0,-20,0); // defined in ODEPhysics.cpp
}
3. Added an existing item to the project (ODEPhysics.cpp)
4. set project->directories->include with the path of "ODEPhysics.h", path of <ode-installed-dir>\include
5. set project->directories->lib with <ode-installed-dir>\lib
Except of the duplicated 'struct GlobStruct * g_pGlob' I get the following linker errors.
What have I missed?
------ Rebuild All started: Project: Camera, Configuration: Release Win32 ------
Deleting intermediate files and output files for project 'Camera', configuration 'Release|Win32'.
Compiling...
ODEPhysics.cpp
Main.cpp
Compiling resources...
Linking...
core.lib(DBDLLCore.obj) : error LNK2005: "struct GlobStruct * g_pGlob" (?g_pGlob@@3PAUGlobStruct@@A) already defined in ODEPhysics.obj
core.lib(DBDLLCore.obj) : warning LNK4006: "struct GlobStruct * g_pGlob" (?g_pGlob@@3PAUGlobStruct@@A) already defined in ODEPhysics.obj; second definition ignored
Creating library .\Release/Camera.lib and object .\Release/Camera.exp
ODEPhysics.obj : error LNK2019: unresolved external symbol _dCloseODE referenced in function "void __cdecl ODE_End(void)" (?ODE_End@@YAXXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetGravity referenced in function "void __cdecl ODE_SetWorldGravity(float,float,float)" (?ODE_SetWorldGravity@@YAXMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetERP referenced in function "void __cdecl ODE_SetWorldERP(float)" (?ODE_SetWorldERP@@YAXM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetCFM referenced in function "void __cdecl ODE_SetWorldCFM(float)" (?ODE_SetWorldCFM@@YAXM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetQuickStepNumIterations referenced in function "void __cdecl ODE_SetWorldQuickStepNumIterations(int)" (?ODE_SetWorldQuickStepNumIterations@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetGravity referenced in function "float __cdecl ODE_GetWorldGravityX(void)" (?ODE_GetWorldGravityX@@YAMXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetERP referenced in function "float __cdecl ODE_GetWorldERP(void)" (?ODE_GetWorldERP@@YAMXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetCFM referenced in function "float __cdecl ODE_GetWorldCFM(void)" (?ODE_GetWorldCFM@@YAMXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetQuickStepNumIterations referenced in function "int __cdecl ODE_GetWorldQuickStepNumIterations(void)" (?ODE_GetWorldQuickStepNumIterations@@YAHXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetAutoDisableFlag referenced in function "void __cdecl ODE_SetAutoDisableFlag(int)" (?ODE_SetAutoDisableFlag@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetAutoDisableLinearThreshold referenced in function "void __cdecl ODE_SetAutoDisableLinearThreshold(float)" (?ODE_SetAutoDisableLinearThreshold@@YAXM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetAutoDisableAngularThreshold referenced in function "void __cdecl ODE_SetAutoDisableAngularThreshold(float)" (?ODE_SetAutoDisableAngularThreshold@@YAXM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetAutoDisableSteps referenced in function "void __cdecl ODE_SetAutoDisableSteps(int)" (?ODE_SetAutoDisableSteps@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetAutoDisableTime referenced in function "void __cdecl ODE_SetAutoDisableTime(float)" (?ODE_SetAutoDisableTime@@YAXM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetAutoDisableFlag referenced in function "int __cdecl ODE_GetAutoDisableFlag(void)" (?ODE_GetAutoDisableFlag@@YAHXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetAutoDisableLinearThreshold referenced in function "float __cdecl ODE_GetAutoDisableLinearThreshold(void)" (?ODE_GetAutoDisableLinearThreshold@@YAMXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetAutoDisableAngularThreshold referenced in function "float __cdecl ODE_GetAutoDisableAngularThreshold(void)" (?ODE_GetAutoDisableAngularThreshold@@YAMXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetAutoDisableSteps referenced in function "int __cdecl ODE_GetAutoDisableSteps(void)" (?ODE_GetAutoDisableSteps@@YAHXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetAutoDisableTime referenced in function "float __cdecl ODE_GetAutoDisableTime(void)" (?ODE_GetAutoDisableTime@@YAMXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldSetContactSurfaceLayer referenced in function "void __cdecl ODE_SetWorldContactSurfaceLayer(float)" (?ODE_SetWorldContactSurfaceLayer@@YAXM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldGetContactSurfaceLayer referenced in function "float __cdecl ODE_GetWorldContactSurfaceLayer(void)" (?ODE_GetWorldContactSurfaceLayer@@YAMXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodyGetRotation referenced in function "void __cdecl CalculateShapeOfObjAfterRotation(struct sODEObject *)" (?CalculateShapeOfObjAfterRotation@@YAXPAUsODEObject@@@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dGeomSetBody referenced in function "void __cdecl ODE_SetCarWheel(int,int,int,float)" (?ODE_SetCarWheel@@YAXHHHM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dCreateSphere referenced in function "void __cdecl ODE_SetCarWheel(int,int,int,float)" (?ODE_SetCarWheel@@YAXHHHM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodyCreate referenced in function "void __cdecl ODE_SetCarWheel(int,int,int,float)" (?ODE_SetCarWheel@@YAXHHHM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodySetRotation referenced in function "void __cdecl ODE_SetCarWheelRotation(int,int,float,float,float)" (?ODE_SetCarWheelRotation@@YAXHHMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dRFromEulerAngles referenced in function "void __cdecl ODE_SetCarWheelRotation(int,int,float,float,float)" (?ODE_SetCarWheelRotation@@YAXHHMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodySetPosition referenced in function "void __cdecl ODE_SetCarWheelPosition(int,int,float,float,float)" (?ODE_SetCarWheelPosition@@YAXHHMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dJointSetHinge2Param referenced in function "void __cdecl ODE_SetCarDefaultJoints(int)" (?ODE_SetCarDefaultJoints@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dJointSetHinge2Axis2 referenced in function "void __cdecl ODE_SetCarDefaultJoints(int)" (?ODE_SetCarDefaultJoints@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dJointSetHinge2Axis1 referenced in function "void __cdecl ODE_SetCarDefaultJoints(int)" (?ODE_SetCarDefaultJoints@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dJointSetHinge2Anchor referenced in function "void __cdecl ODE_SetCarDefaultJoints(int)" (?ODE_SetCarDefaultJoints@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodyGetPosition referenced in function "void __cdecl ODE_SetCarDefaultJoints(int)" (?ODE_SetCarDefaultJoints@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dJointAttach referenced in function "void __cdecl ODE_SetCarDefaultJoints(int)" (?ODE_SetCarDefaultJoints@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dJointCreateHinge2 referenced in function "void __cdecl ODE_SetCarDefaultJoints(int)" (?ODE_SetCarDefaultJoints@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dGeomSetPosition referenced in function "void __cdecl ODE_CreateStaticBox(int,float,float,float)" (?ODE_CreateStaticBox@@YAXHMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dCreateBox referenced in function "void __cdecl ODE_CreateStaticBox(int,float,float,float)" (?ODE_CreateStaticBox@@YAXHMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dMassSetZero referenced in function "public: __thiscall dMass::dMass(void)" (??0dMass@@QAE@XZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dJointGroupCreate referenced in function "void __cdecl ODE_Start(void)" (?ODE_Start@@YAXXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dHashSpaceCreate referenced in function "void __cdecl ODE_Start(void)" (?ODE_Start@@YAXXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldCreate referenced in function "void __cdecl ODE_Start(void)" (?ODE_Start@@YAXXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dCreateTriMesh referenced in function "void __cdecl ODE_CreateStaticTriangleMesh(int)" (?ODE_CreateStaticTriangleMesh@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dGeomTriMeshDataBuildSingle referenced in function "void __cdecl ODE_CreateStaticTriangleMesh(int)" (?ODE_CreateStaticTriangleMesh@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dGeomTriMeshDataCreate referenced in function "void __cdecl ODE_CreateStaticTriangleMesh(int)" (?ODE_CreateStaticTriangleMesh@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dMassSetBox referenced in function "bool __cdecl GetODETriangleMesh(struct sODECar *,struct sObject *,struct sMesh *)" (?GetODETriangleMesh@@YA_NPAUsODECar@@PAUsObject@@PAUsMesh@@@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dGeomSetData referenced in function "bool __cdecl GetODETriangleMesh(struct sODECar *,struct sObject *,struct sMesh *)" (?GetODETriangleMesh@@YA_NPAUsODECar@@PAUsObject@@PAUsMesh@@@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dMassAdjust referenced in function "void __cdecl ODE_SetCarWheelMass(int,int,float)" (?ODE_SetCarWheelMass@@YAXHHM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dMassSetSphere referenced in function "void __cdecl ODE_SetCarWheelMass(int,int,float)" (?ODE_SetCarWheelMass@@YAXHHM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dRSetIdentity referenced in function "void __cdecl ODE_SetBodyRotation(int,float,float,float)" (?ODE_SetBodyRotation@@YAXHMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodySetLinearVel referenced in function "void __cdecl ODE_SetBodyLinearVelocity(int,float,float,float)" (?ODE_SetBodyLinearVelocity@@YAXHMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodySetAngularVel referenced in function "void __cdecl ODE_SetBodyAngularVelocity(int,float,float,float)" (?ODE_SetBodyAngularVelocity@@YAXHMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodyGetLinearVel referenced in function "unsigned long __cdecl ODE_GetBodyLinearVelocityX(int)" (?ODE_GetBodyLinearVelocityX@@YAKH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodyGetAngularVel referenced in function "unsigned long __cdecl ODE_GetBodyAngularVelocityX(int)" (?ODE_GetBodyAngularVelocityX@@YAKH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodySetMass referenced in function "void __cdecl ODE_SetBodyMass(int,float)" (?ODE_SetBodyMass@@YAXHM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodyEnable referenced in function "void __cdecl ODE_SetLinearVelocity(int,float,float,float)" (?ODE_SetLinearVelocity@@YAXHMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodyAddForceAtPos referenced in function "void __cdecl ODE_AddBodyForce(int,float,float,float,float,float,float)" (?ODE_AddBodyForce@@YAXHMMMMMM@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodySetGravityMode referenced in function "void __cdecl ODE_SetGravity(int,int)" (?ODE_SetGravity@@YAXHH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dGeomDestroy referenced in function "void __cdecl ODE_DestroyObject(int)" (?ODE_DestroyObject@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodyDestroy referenced in function "void __cdecl ODE_DestroyObject(int)" (?ODE_DestroyObject@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dJointCreateContact referenced in function "void __cdecl ODE_Callback(void *,struct dxGeom *,struct dxGeom *)" (?ODE_Callback@@YAXPAXPAUdxGeom@@1@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dCollide referenced in function "void __cdecl ODE_Callback(void *,struct dxGeom *,struct dxGeom *)" (?ODE_Callback@@YAXPAXPAUdxGeom@@1@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dGeomGetBody referenced in function "void __cdecl ODE_Callback(void *,struct dxGeom *,struct dxGeom *)" (?ODE_Callback@@YAXPAXPAUdxGeom@@1@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dBodyIsEnabled referenced in function "void __cdecl ODE_Update(void)" (?ODE_Update@@YAXXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dJointGroupEmpty referenced in function "void __cdecl ODE_Update(void)" (?ODE_Update@@YAXXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldStep referenced in function "void __cdecl ODE_Update(void)" (?ODE_Update@@YAXXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dWorldQuickStep referenced in function "void __cdecl ODE_Update(void)" (?ODE_Update@@YAXXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dSpaceCollide referenced in function "void __cdecl ODE_Update(void)" (?ODE_Update@@YAXXZ)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dGeomSetRotation referenced in function "void __cdecl ODE_CreateStaticBox(int)" (?ODE_CreateStaticBox@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dSpaceAdd referenced in function "void __cdecl ODE_UpdateCar(int)" (?ODE_UpdateCar@@YAXH@Z)
ODEPhysics.obj : error LNK2019: unresolved external symbol _dSpaceSetCleanup referenced in function "void __cdecl ODE_UpdateCar(int)" (?ODE_UpdateCar@@YAXH@Z)
.\Release/Camera.exe : fatal error LNK1120: 70 unresolved externals