[ODE] Compiling OPCODE 1.0 as a static lib for use with tri-collider

Ken MacLeod kjmac at freenet.co.uk
Sun Oct 20 12:11:02 2002


(Apologies if this message is posted twice, I initially sent it using
the incorrect email account)

Hi,
I’m developing a car simulation API for my MSc degree. I would like to
be able to use ODE with the tri-collider contribution (ode/contrib) so
that I can do sphere (wheel) triangle (terrain) collisions. Unfortunatly
I have cannot for the life of me get opcode to compile as a static
library. I printed off and followed the guide on the Wiki pages, but got
only the following error output:

--------------------Configuration: OPCODE 1_0 - Win32
Debug--------------------
Compiling...
OPC_Container.cpp
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(41) : warning C4273:
'private: static unsigned int Opcode::Container::mNbContainers' :
inconsistent dll linkage.  dllexport assumed.
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(41) : error C2491:
'Container::mNbContainers' : definition of dllimport static data member
not allowed
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(42) : warning C4273:
'private: static unsigned int Opcode::Container::mUsedRam' :
inconsistent dll linkage.  dllexport assumed.
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(42) : error C2491:
'Container::mUsedRam' : definition of dllimport static data member not
allowed
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(50) : warning C4273:
'Container::Container' : inconsistent dll linkage.  dllexport assumed.
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(64) : warning C4273:
'Container::~Container' : inconsistent dll linkage.  dllexport assumed.
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(79) : warning C4273: 'Resize'
: inconsistent dll linkage.  dllexport assumed.
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(121) : warning C4273:
'Contains' : inconsistent dll linkage.  dllexport assumed.
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(143) : warning C4273:
'Delete' : inconsistent dll linkage.  dllexport assumed.
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(166) : warning C4273:
'FindNext' : inconsistent dll linkage.  dllexport assumed.
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(186) : warning C4273:
'FindPrev' : inconsistent dll linkage.  dllexport assumed.
C:\MSc\opcode 1.0\opcode\OPC_Container.cpp(204) : warning C4273:
'GetUsedRam' : inconsistent dll linkage.  dllexport assumed.
OPC_Matrix4x4.cpp
C:\MSc\opcode 1.0\opcode\OPC_Matrix4x4.cpp(65) : error C2491:
'InvertPRMatrix' : definition of dllimport function not allowed
Error executing cl.exe.

OPCODE 1_0.lib - 3 error(s), 10 warning(s)

Looking through the archives for this mailing list someone named Norman
had the same problem. He posted a message saying the he to could not
compile opcode 1.0 as a static lib, unfortunately I could not see any
reply to his request in the archives. Norman’s next post just thanked
the author for helping him get it compiling! Here’s a snippit:

------------
Hi,

Thanks to the author's help I was able to compile the tri-collider -
I needed to modify opcode to compile it as a static library, then
compile the files in the tri-collider directory as a static library,
then link my test app against both libraries.

…
----------


All help with this is greatly appreciated! Thanks,

- Ken MacLeod


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.394 / Virus Database: 224 - Release Date: 03/10/2002