[ODE] ODE as DLL

nlin@nlin.net nlin at nlin.net
Thu Jan 3 01:03:02 2002


--ELM716327892-6408-0_
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi guys,

Here are my additions to compile ODE as a DLL under MSVC. These changes
are against ODE-0.03. 

I added a new configuration "msvc-dll". There were some annoying issues
regarding shell quoting (because I have to pass command-line parameters
with parentheses in them, which bash - used by cygnus make - doesn't like,
and quoting the parenthesized parameters works okay except the compilation
rule for the configurator again quotes the compiler string, leading to
double quoting and errors).

Basically the main thing which needed to be done was to add
__declspec(dllimport) and __declspec(dllexport) before all global variables
which were used (dInfinity, dBoxClass, etc); otherwise, these global
variables (in the DLL) are not accessible from the host process. I added
these declarations in a platform-independent way using preprocessor defines
set within the msvc-dll target makefile (config/makefile.msvc-dll).

One issue is that the exports list in config/msvcdefs.def needs to be updated
when new functions are exported.

Russ, can this make it into the official release? I'd hate to keep on needing
to roll in my changes into every release (because I need ODE as a DLL).

-Norman


--ELM716327892-6408-0_
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: attachment; filename=dll.txt
Content-Description: /tmp/dll.txt
Content-Transfer-Encoding: 7bit

diff -r -c -N ode-0.03/Makefile ode-0.03.dll/Makefile
*** ode-0.03/Makefile	Tue Dec 25 05:29:04 2001
--- ode-0.03.dll/Makefile	Thu Jan  3 15:13:35 2002
***************
*** 147,154 ****
--- 147,159 ----
  ode-test: ode-lib drawstuff-lib $(ODE_TEST_EXE)
  drawstuff-test: drawstuff-lib $(DRAWSTUFF_TEST_EXE)
  
+ ifeq ($(SHAREDLIB),1)
+ $(ODE_LIB): $(ODE_OBJECTS)
+ 	$(SHARED_AR)$(patsubst %.lib,%.dll,$@) $(ODE_OBJECTS)
+ else
  $(ODE_LIB): $(ODE_OBJECTS)
  	$(AR)$@ $(ODE_OBJECTS)
+ endif
  
  $(DRAWSTUFF_LIB): $(DRAWSTUFF_OBJECTS)
  	$(AR)$@ $(DRAWSTUFF_OBJECTS)
***************
*** 179,190 ****
  
  configure: $(CONFIG_H)
  
  $(CONFIG_H): $(CONFIGURATOR_EXE) $(USER_SETTINGS) $(PLATFORM_MAKEFILE)
  	$(THIS_DIR)$(CONFIGURATOR_EXE) $(CONFIG_H) "$(CC) $(DEFINES) $(C_EXEOUT)" "$(DEL_CMD)" $(THIS_DIR)
  
  $(CONFIGURATOR_EXE): $(CONFIGURATOR_SRC) $(USER_SETTINGS) $(PLATFORM_MAKEFILE)
  	$(CC) $(C_DEF)d$(PRECISION) $(DEFINES) $(C_EXEOUT)$@ $<
- 
  
  # unix-gcc specific dependency making
  
--- 184,199 ----
  
  configure: $(CONFIG_H)
  
+ ifdef QUOTABLE_CC
+ $(CONFIG_H): $(CONFIGURATOR_EXE) $(USER_SETTINGS) $(PLATFORM_MAKEFILE)
+ 	$(THIS_DIR)$(CONFIGURATOR_EXE) $(CONFIG_H) "$(QUOTABLE_CC) $(DEFINES) $(C_EXEOUT)" "$(DEL_CMD)" $(THIS_DIR)
+ else
  $(CONFIG_H): $(CONFIGURATOR_EXE) $(USER_SETTINGS) $(PLATFORM_MAKEFILE)
  	$(THIS_DIR)$(CONFIGURATOR_EXE) $(CONFIG_H) "$(CC) $(DEFINES) $(C_EXEOUT)" "$(DEL_CMD)" $(THIS_DIR)
+ endif
  
  $(CONFIGURATOR_EXE): $(CONFIGURATOR_SRC) $(USER_SETTINGS) $(PLATFORM_MAKEFILE)
  	$(CC) $(C_DEF)d$(PRECISION) $(DEFINES) $(C_EXEOUT)$@ $<
  
  # unix-gcc specific dependency making
  
diff -r -c -N ode-0.03/config/makefile.config ode-0.03.dll/config/makefile.config
*** ode-0.03/config/makefile.config	Thu Jan  1 01:00:00 1970
--- ode-0.03.dll/config/makefile.config	Mon Dec 31 09:22:44 2001
***************
*** 0 ****
--- 1,29 ----
+ THIS_DIR=./
+ DEL_CMD=rm -f
+ CC=gcc
+ OBJ=.o
+ C_FLAGS=-c -Wall -fno-rtti -fno-exceptions -Wall
+ C_INC=-I
+ C_OUT=-o 
+ C_EXEOUT=-o 
+ C_DEF=-D
+ C_OPT=-O
+ AR=ar rc 
+ RANLIB=
+ LIB_PREFIX=lib
+ LIB_SUFFIX=.a
+ LINK_OPENGL=-L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib/X11R6 -L/usr/lib/X11 -lX11 -lGL -lGLU
+ LINK_MATH=-lm
+ 
+ ifeq ($(BUILD),release)
+ OPT=2
+ C_FLAGS+=-fomit-frame-pointer -ffast-math
+ endif
+ 
+ ifeq ($(BUILD),debug)
+ OPT=0
+ C_FLAGS+=-g
+ endif
+ 
+ # some other possible flags:
+ #   -malign-double -mpentiumpro -march=pentiumpro
diff -r -c -N ode-0.03/config/makefile.msvc-dll ode-0.03.dll/config/makefile.msvc-dll
*** ode-0.03/config/makefile.msvc-dll	Thu Jan  1 01:00:00 1970
--- ode-0.03.dll/config/makefile.msvc-dll	Thu Jan  3 15:22:35 2002
***************
*** 0 ****
--- 1,32 ----
+ WINDOWS=1
+ THIS_DIR=
+ DEL_CMD=tools\rm
+ CC=cl /nologo /DWIN32 /DMSVC /DSHAREDLIBIMPORT="__declspec(dllimport)" /DSHAREDLIBEXPORT="__declspec(dllexport)"
+ QUOTABLE_CC=cl /nologo /DWIN32 /DMSVC /DSHAREDLIBIMPORT=""__declspec(dllimport)"" /DSHAREDLIBEXPORT=""__declspec(dllexport)""
+ OBJ=.obj
+ C_FLAGS=/c /GR- /GX- /W3 /GF
+ C_INC=/I
+ C_OUT=/Fo
+ C_EXEOUT=/Fe
+ C_DEF=/D
+ C_OPT=/O
+ AR=lib /nologo /OUT:
+ RANLIB=
+ LIB_PREFIX=
+ LIB_SUFFIX=.lib
+ LINK_OPENGL=Comctl32.lib kernel32.lib user32.lib gdi32.lib OpenGL32.lib Glu32.lib
+ LINK_MATH=
+ RC_RULE=rc /r /fo$@ $<
+ 
+ ifeq ($(BUILD),release)
+ OPT=2
+ C_FLAGS+=/Oy
+ endif
+ 
+ ifeq ($(BUILD),debug)
+ OPT=d
+ endif
+ 
+ SHAREDLIB=1
+ MSVC_DEFS=config/msvcdefs.def
+ SHARED_AR=link /dll /nologo /SUBSYSTEM:WINDOWS /LIBPATH:"C:\Programme\Micros~2\VC98\Lib" /def:$(MSVC_DEFS) $(LINK_OPENGL) /OUT:
diff -r -c -N ode-0.03/config/msvcdefs.def ode-0.03.dll/config/msvcdefs.def
*** ode-0.03/config/msvcdefs.def	Thu Jan  1 01:00:00 1970
--- ode-0.03.dll/config/msvcdefs.def	Thu Jan  3 15:09:33 2002
***************
*** 0 ****
--- 1,141 ----
+ LIBRARY ODE
+ EXPORTS
+ dWorldCreate
+ dJointGroupCreate
+ dHashSpaceCreate
+ dWorldDestroy
+ dSpaceDestroy
+ dJointGroupDestroy
+ dWorldSetGravity
+ dGeomSetRotation
+ dGeomSetPosition
+ dCreatePlane
+ dGeomSetBody
+ dCreateSphere
+ dBodySetRotation
+ dBodySetMass
+ dMassAdjust
+ dMassSetSphere
+ dBodySetPosition
+ dBodyCreate
+ dMassSetZero
+ dCreateBox
+ dMassSetBox
+ dJointSetHingeParam
+ dJointSetHingeAxis
+ dJointSetHingeAnchor
+ dJointAttach
+ dJointCreateHinge
+ dBodyGetPosition
+ dBodyGetRotation
+ dGeomGetPosition
+ dGeomGetRotation
+ dBodyAddTorque
+ dBodyAddForce
+ dBodySetLinearVel
+ dBodySetAngularVel
+ dJointCreateContact
+ dCollide
+ dAreConnected
+ dGeomGetBody
+ dSpaceCollide
+ dJointGroupEmpty
+ dWorldStep 
+ dSetMessageHandler
+ dTestRand
+ dMaxDifference
+ dMultiply0
+ dSetZero
+ dMakeRandomVector
+ dNormalize3
+ dPlaneSpace
+ dMultiply2
+ dMultiply1
+ dMakeRandomMatrix
+ dClearUpperTriangle
+ dFactorCholesky
+ dSolveCholesky
+ dInvertPDMatrix
+ dIsPositiveDefinite
+ dFactorLDLT
+ dSolveLDLT
+ dLDLTAddTL
+ dLDLTRemove
+ dRemoveRowCol
+ dMassRotate
+ dMassTranslate
+ dRandReal
+ dMassSetCappedCylinder
+ dMassSetParameters
+ dRtoQ
+ dQtoR
+ dNormalize4
+ dQMultiply3
+ dQMultiply2
+ dQMultiply1
+ dQMultiply0
+ dRSetIdentity
+ dTestSolveLCP
+ dTestMatrixComparison
+ dJointSetBallAnchor
+ dJointCreateBall
+ dBodyDestroy
+ dJointDestroy
+ dGeomDestroy
+ dBodySetData
+ dBodySetQuaternion
+ dQFromAxisAndAngle
+ dRFromAxisAndAngle
+ dBodyGetAngularVel
+ dJointSetSliderAxis
+ dJointCreateSlider
+ dBoxBox
+ dRandSetSeed
+ dJointSetHinge2Param
+ dJointSetHinge2Axis2
+ dJointSetHinge2Axis1
+ dJointSetHinge2Anchor
+ dJointCreateHinge2
+ dGeomBoxGetLengths
+ dJointGetHinge2Angle1
+ dWorldSetCFM
+ dWorldSetERP
+ dJointSetSliderParam
+ dJointSetFixed
+ dJointCreateFixed
+ dJointGetHinge2Angle2Rate
+ dJointGetHinge2Angle1Rate
+ dJointGetSliderPositionRate
+ dJointGetSliderPosition
+ dJointGetHingeAngleRate
+ dJointGetHingeAngle
+ dError
+ dInfinityValue
+ dGeomTransformGetGeom
+ dGeomTransformClass
+ dGeomCCylinderGetParams
+ dCCylinderClass
+ dGeomSphereGetRadius
+ dSphereClass
+ dBoxClass
+ dGeomGetClass
+ dBodyEnable
+ dBodyDisable
+ dMassAdd
+ dGeomTransformSetGeom
+ dGeomTransformSetCleanup
+ dCreateGeomTransform
+ dCreateCCylinder
+ dBodyIsEnabled
+ dGeomGroupAdd
+ dCreateGeomGroup
+ dJointSetAMotorMode
+ dJointSetAMotorAxis
+ dJointSetAMotorNumAxes
+ dJointCreateAMotor
+ dJointGetAMotorAngle
+ dHashSpaceSetLevels
+ dGeomSetData
+ dGeomGetData
+ dBodyGetQuaternion
+ dRandInt
diff -r -c -N ode-0.03/config/user-settings ode-0.03.dll/config/user-settings
*** ode-0.03/config/user-settings	Tue Dec 25 21:00:26 2001
--- ode-0.03.dll/config/user-settings	Thu Jan  3 15:09:51 2002
***************
*** 10,16 ****
  #			variable in makefile.unix-generic
  #	osx		Mac OS-X, with the gnu compiler.
  
! PLATFORM=msvc
  
  # (2) the floating point precision to use (either "SINGLE" or "DOUBLE")
  
--- 10,16 ----
  #			variable in makefile.unix-generic
  #	osx		Mac OS-X, with the gnu compiler.
  
! PLATFORM=msvc-dll
  
  # (2) the floating point precision to use (either "SINGLE" or "DOUBLE")
  
diff -r -c -N ode-0.03/configurator.c ode-0.03.dll/configurator.c
*** ode-0.03/configurator.c	Tue Dec 25 07:25:35 2001
--- ode-0.03.dll/configurator.c	Thu Jan  3 15:08:24 2002
***************
*** 286,292 ****
    FILE *f;
  #ifdef dSINGLE
  
! #define INFBYTES "union dInfBytes { unsigned char c[4]; float f; };\nextern union dInfBytes dInfinityValue;\n#define dInfinity (dInfinityValue.f)"
  
    char *inc[6]	= {"#include <math.h>",
  		   "#include <math.h>",
--- 286,304 ----
    FILE *f;
  #ifdef dSINGLE
  
! #define SHARED_LIB_SPEC_DECISION \
!     "#if !defined ( SHAREDLIBIMPORT )\n" \
!     "#define SHAREDLIBIMPORT\n" \
!     "#endif\n" \
!     "#if defined SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE\n" \
!     "  #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT\n" \
!     "#else \n" \
!     "  #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT\n" \
!     "#endif\n"
! 
! #define UNDEF_SHAREDLIB_SPEC "#undef GLOBAL_SHAREDLIB_SPEC\n"
! 
! #define INFBYTES SHARED_LIB_SPEC_DECISION "union dInfBytes { unsigned char c[4]; float f; };\nextern GLOBAL_SHAREDLIB_SPEC union dInfBytes dInfinityValue;\n#define dInfinity (dInfinityValue.f)"
  
    char *inc[6]	= {"#include <math.h>",
  		   "#include <math.h>",
***************
*** 295,316 ****
  		   "",
  		   ""};
    char *decl[6] = {
!     "double dInfinityValue = HUGE_VALF;",
!     "double dInfinityValue = HUGE_VAL;",
!     "union dInfBytes dInfinityValue = {{0x7f,0x80,0,0}};",
!     "union dInfBytes dInfinityValue = {{0,0,0x80,0x7f}};",
!     "double dInfinityValue = 1.0f/0.0f;",
!     "double dInfinityValue = 1e20f;"};
    char *inf[6]	= {
!     "extern double dInfinityValue;\n#define dInfinity dInfinityValue",
!     "extern double dInfinityValue;\n#define dInfinity dInfinityValue",
!     INFBYTES,
!     INFBYTES,
!     "extern double dInfinityValue;\n#define dInfinity dInfinityValue",
!     "extern double dInfinityValue;\n#define dInfinity dInfinityValue"};
  #else
  
! #define INFBYTES "union dInfBytes { unsigned char c[8]; double d; };\nextern union dInfBytes dInfinityValue;\n#define dInfinity (dInfinityValue.d)"
  
    char *inc[5]	= {
      "#include <math.h>",
--- 307,340 ----
  		   "",
  		   ""};
    char *decl[6] = {
!     "SHAREDLIBEXPORT double dInfinityValue = HUGE_VALF;",
!     "SHAREDLIBEXPORT double dInfinityValue = HUGE_VAL;",
!     "SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0x7f,0x80,0,0}};",
!     "SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0,0,0x80,0x7f}};",
!     "SHAREDLIBEXPORT double dInfinityValue = 1.0f/0.0f;",
!     "SHAREDLIBEXPORT double dInfinityValue = 1e20f;"};
    char *inf[6]	= {
!     SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC,
!     SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC,
!     INFBYTES UNDEF_SHAREDLIB_SPEC,
!     INFBYTES UNDEF_SHAREDLIB_SPEC,
!     SHAREDLIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC,
!     SHAREDLIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC};
  #else
  
! #define SHARED_LIB_SPEC_DECISION \
!     "#if !defined ( SHAREDLIBIMPORT )\n" \
!     "#define SHAREDLIBIMPORT\n" \
!     "#endif\n" \
!     "#if defined SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE\n" \
!     "  #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT\n" \
!     "#else \n" \
!     "  #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT\n" \
!     "#endif\n"
! 
! #define UNDEF_SHAREDLIB_SPEC "\n#undef GLOBAL_SHAREDLIB_SPEC\n"
! 
! #define INFBYTES SHARED_LIB_SPEC_DECISION "union dInfBytes { unsigned char c[8]; double d; };\nextern GLOBAL_SHAREDLIB_SPEC union dInfBytes dInfinityValue;\n#define dInfinity (dInfinityValue.d)"
  
    char *inc[5]	= {
      "#include <math.h>",
***************
*** 318,335 ****
      "",
      "",
      ""};
    char *decl[5] = {
!     "double dInfinityValue = HUGE_VAL;",
!     "union dInfBytes dInfinityValue = {{0x7f,0xf0,0,0,0,0,0,0}};",
!     "union dInfBytes dInfinityValue = {{0,0,0,0,0,0,0xf0,0x7f}};",
!     "double dInfinityValue = 1.0/0.0;",
!     "double dInfinityValue = 1e20;"};
    char *inf[5]	= {
!     "extern double dInfinityValue;\n#define dInfinity dInfinityValue",
!     INFBYTES,
!     INFBYTES,
!     "extern double dInfinityValue;\n#define dInfinity dInfinityValue",
!     "extern double dInfinityValue;\n#define dInfinity dInfinityValue"};
  #endif
  
    write_header_comment (file,"select the base floating point type");
--- 342,360 ----
      "",
      "",
      ""};
+ 
    char *decl[5] = {
!     "SHAREDLIBEXPORT double dInfinityValue = HUGE_VAL;",
!     "SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0x7f,0xf0,0,0,0,0,0,0}};",
!     "SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0,0,0,0,0,0,0xf0,0x7f}};",
!     "SHAREDLIBEXPORT double dInfinityValue = 1.0/0.0;",
!     "SHAREDLIBEXPORT double dInfinityValue = 1e20;"};
    char *inf[5]	= {
!     SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC,
!     INFBYTES UNDEF_SHAREDLIB_SPEC,
!     INFBYTES UNDEF_SHAREDLIB_SPEC,
!     SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC,
!     SHARED_LIB_SPEC_DECISION "extern GLOBAL_SHAREDLIB_SPEC double dInfinityValue;\n#define dInfinity dInfinityValue" UNDEF_SHAREDLIB_SPEC};
  #endif
  
    write_header_comment (file,"select the base floating point type");
diff -r -c -N ode-0.03/include/ode/config.h ode-0.03.dll/include/ode/config.h
*** ode-0.03/include/ode/config.h	Thu Jan  1 01:00:00 1970
--- ode-0.03.dll/include/ode/config.h	Thu Jan  3 15:52:48 2002
***************
*** 0 ****
--- 1,54 ----
+ /* per-machine configuration. this file is automatically generated. */
+ 
+ #ifndef _ODE_CONFIG_H_
+ #define _ODE_CONFIG_H_
+ 
+ /* standard system headers */
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
+ #include <string.h>
+ #include <stdarg.h>
+ #include <malloc.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /* is this a pentium on a gcc-based platform? */
+ /* #define PENTIUM 1 -- not a pentium */
+ 
+ /* integer types (we assume int >= 32 bits) */
+ typedef char int8;
+ typedef unsigned char uint8;
+ typedef int int32;
+ typedef unsigned int uint32;
+ 
+ /* an integer type that we can safely cast a pointer to and
+  * from without loss of bits.
+  */
+ typedef unsigned int intP;
+ 
+ /* select the base floating point type */
+ #define dDOUBLE 1
+ 
+ /* the floating point infinity */
+ #define DINFINITY_DECL SHAREDLIBEXPORT union dInfBytes dInfinityValue = {{0,0,0,0,0,0,0xf0,0x7f}};
+ #if !defined ( SHAREDLIBIMPORT )
+ #define SHAREDLIBIMPORT
+ #endif
+ #if defined SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE
+   #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT
+ #else 
+   #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT
+ #endif
+ union dInfBytes { unsigned char c[8]; double d; };
+ extern GLOBAL_SHAREDLIB_SPEC union dInfBytes dInfinityValue;
+ #define dInfinity (dInfinityValue.d)
+ #undef GLOBAL_SHAREDLIB_SPEC
+ 
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ #endif
diff -r -c -N ode-0.03/include/ode/geom.h ode-0.03.dll/include/ode/geom.h
*** ode-0.03/include/ode/geom.h	Tue Dec 25 05:29:05 2001
--- ode-0.03.dll/include/ode/geom.h	Thu Jan  3 15:08:52 2002
***************
*** 44,55 ****
  /* standard classes */
  
  /* class numbers */
! extern int dSphereClass;
! extern int dBoxClass;
! extern int dCCylinderClass;
! extern int dPlaneClass;
! extern int dGeomGroupClass;
! extern int dGeomTransformClass;
  
  /* constructors */
  dGeomID dCreateSphere (dSpaceID space, dReal radius);
--- 44,65 ----
  /* standard classes */
  
  /* class numbers */
! #if !defined ( SHAREDLIBIMPORT )
! #define SHAREDLIBIMPORT 
! #endif
! 
! #if defined SHARED_GEOM_H_INCLUDED_FROM_DEFINING_FILE
!   #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBEXPORT
! #else 
!   #define GLOBAL_SHAREDLIB_SPEC SHAREDLIBIMPORT
! #endif
! 
! extern GLOBAL_SHAREDLIB_SPEC int dSphereClass;
! extern GLOBAL_SHAREDLIB_SPEC int dBoxClass;
! extern GLOBAL_SHAREDLIB_SPEC int dCCylinderClass;
! extern GLOBAL_SHAREDLIB_SPEC int dPlaneClass;
! extern GLOBAL_SHAREDLIB_SPEC int dGeomGroupClass;
! extern GLOBAL_SHAREDLIB_SPEC int dGeomTransformClass;
  
  /* constructors */
  dGeomID dCreateSphere (dSpaceID space, dReal radius);
diff -r -c -N ode-0.03/ode/src/geom.cpp ode-0.03.dll/ode/src/geom.cpp
*** ode-0.03/ode/src/geom.cpp	Tue Dec 25 05:29:06 2001
--- ode-0.03.dll/ode/src/geom.cpp	Thu Jan  3 15:09:08 2002
***************
*** 28,34 ****
--- 28,36 ----
  */
  
  #include <ode/common.h>
+ #define SHARED_GEOM_H_INCLUDED_FROM_DEFINING_FILE
  #include <ode/geom.h>
+ #undef SHARED_GEOM_H_INCLUDED_FROM_DEFINING_FILE
  #include <ode/rotation.h>
  #include <ode/odemath.h>
  #include <ode/memory.h>
***************
*** 1283,1293 ****
  //****************************************************************************
  // standard classes
  
! int dSphereClass = -1;
! int dBoxClass = -1;
! int dCCylinderClass = -1;
! int dPlaneClass = -1;
! 
  
  static dColliderFn * dSphereColliderFn (int num)
  {
--- 1285,1298 ----
  //****************************************************************************
  // standard classes
  
! #ifndef SHAREDLIBEXPORT
! #define SHAREDLIBEXPORT
! #endif
! 
! SHAREDLIBEXPORT int dSphereClass = -1;
! SHAREDLIBEXPORT int dBoxClass = -1;
! SHAREDLIBEXPORT int dCCylinderClass = -1;
! SHAREDLIBEXPORT int dPlaneClass = -1;
  
  static dColliderFn * dSphereColliderFn (int num)
  {
diff -r -c -N ode-0.03/ode/src/odemath.cpp ode-0.03.dll/ode/src/odemath.cpp
*** ode-0.03/ode/src/odemath.cpp	Tue Dec 25 05:29:06 2001
--- ode-0.03.dll/ode/src/odemath.cpp	Thu Jan  3 15:33:47 2002
***************
*** 20,26 ****
--- 20,28 ----
   *                                                                       *
   *************************************************************************/
  
+ #define SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE
  #include <ode/common.h>
+ #undef SHARED_CONFIG_H_INCLUDED_FROM_DEFINING_FILE
  #include <ode/odemath.h>
  
  

--ELM716327892-6408-0_--