Awkward Win32 build procedure (was RE: [ODE] Trimesh collision)

John Miles jmiles at pop.net
Wed Jan 14 10:40:34 MST 2004


> P.S. BTW compling the ODE library as a dll was quite a drag. My teammate
> Zahid compiled it by changing/adding many config settings and parameters

Agreed.  The supplied makefile.msvc-dll doesn't even come close to working
as-is with MSVC6.  Here's my edit, if it'll save anyone else the trouble:

--------------------
 WINDOWS=1
THIS_DIR=
DEL_CMD=tools\rm
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 /debugtype:cv /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
C_FLAGS+=/Z7
endif

ODE_LIB_AR_RULE=link /dll /debug:full /debugtype:cv /map /PDB:NONE
/INCREMENTAL:NO /nologo /SUBSYSTEM:WINDOWS /def:config/msvcdefs.def
$(LINK_OPENGL) /OUT:$(patsubst %.lib,%.dll,$@)
---------------------

I also found it necessary to remove dBodyGetAutoDisableSF1,
dBodyGetAutoDisableStepsSF1, and dBodyGetAutoDisableThresholdSF1 from
msvcdefs.def.  These functions aren't implemented anywhere in the ODE 0.039
release, and the DLL won't link unless you remove their export entries from
the .def file.  Where are these functions supposed to come from?

I'll probably create a new MSVC nmake file from scratch one of these days,
to make life easier for GNU Make-illiterates such as myself.  Will add it to
the Wiki when/if it happens.  I'm not complaining, though -- writing a
makefile is a lot easier than writing a dynamics engine. :)

-- jm



More information about the ODE mailing list