Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Official forum for the Chipmunk2D Physics Library.

Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Postby aisman » Sun Dec 18, 2011 3:37 pm

Maybe someone is missing the Chipmunk.def file on Chipmunk 6.0.3.
Here is it:
Code: Select all
LIBRARY

EXPORTS
_cpv
_cpveql
_cpvadd
_cpvneg
_cpvsub
_cpvmult
_cpvdot
_cpvcross
_cpvperp
_cpvrperp
_cpvproject
_cpvrotate
_cpvunrotate
_cpvlengthsq
_cpvlerp
_cpvnormalize
_cpvnormalize_safe
_cpvclamp
_cpvlerpconst
_cpvdist
_cpvdistsq
_cpvnear

_cpfmax
_cpfmin
_cpfabs
_cpfclamp
_cpflerp
_cpflerpconst

_cpBBNew
_cpBBNewForCircle
_cpBBIntersects
_cpBBContainsBB
_cpBBContainsVect
_cpBBMerge
_cpBBExpand
_cpBBArea
_cpBBMergedArea
_cpBBSegmentQuery
_cpBBIntersectsSegment

_cpBodyGetMass
_cpBodyGetMoment
_cpBodyGetPos
_cpBodyGetAngle
_cpBodyGetRot

_cpBodyGetVel
_cpBodyGetForce
_cpBodyGetAngVel
_cpBodyGetTorque
_cpBodyGetVelLimit
_cpBodyGetAngVelLimit
_cpBodyGetUserData
_cpBodySetVel
_cpBodySetForce
_cpBodySetAngVel
_cpBodySetTorque
_cpBodySetVelLimit
_cpBodySetAngVelLimit
_cpBodySetUserData

_cpBodyIsSleeping
_cpBodyIsStatic
_cpBodyIsRogue
_cpBodyLocal2World
_cpBodyWorld2Local
_cpBodyKineticEnergy

_cpShapeGetBB

_cpShapeGetBody
_cpShapeGetSensor
_cpShapeGetElasticity
_cpShapeGetFriction
_cpShapeGetSurfaceVelocity
_cpShapeGetUserData
_cpShapeGetCollisionType
_cpShapeGetGroup
_cpShapeGetLayers
_cpShapeSetBody
_cpShapeSetSensor
_cpShapeSetElasticity
_cpShapeSetFriction
_cpShapeSetSurfaceVelocity
_cpShapeSetUserData
_cpShapeSetCollisionType
_cpShapeSetGroup
_cpShapeSetLayers

_cpArbiterGetShapes
_cpArbiterGetBodies
_cpArbiterIsFirstContact
_cpArbiterGetCount

_cpConstraintGetA
_cpConstraintGetB
_cpConstraintSetMaxForce
_cpConstraintSetErrorBias
_cpConstraintSetMaxBias
_cpConstraintSetUserData
_cpConstraintSetMaxForce
_cpConstraintSetErrorBias
_cpConstraintSetMaxBias
_cpConstraintSetUserData
_cpConstraintGetImpulse

_cpDampedRotarySpringSetRestAngle
_cpDampedRotarySpringSetStiffness
_cpDampedRotarySpringSetDamping

_cpDampedRotarySpringSetRestAngle
_cpDampedRotarySpringSetStiffness
_cpDampedRotarySpringSetDamping


_cpDampedSpringGetAnchr1
_cpDampedSpringGetAnchr2
_cpDampedSpringGetRestLength
_cpDampedSpringGetStiffness
_cpDampedSpringGetDamping

_cpDampedSpringSetAnchr1
_cpDampedSpringSetAnchr2
_cpDampedSpringSetRestLength
_cpDampedSpringSetStiffness
_cpDampedSpringSetDamping


_cpGearJointGetPhase
_cpGearJointSetPhase
_cpGearJointGetRatio

_cpGrooveJointGetAnchr2
_cpGrooveJointSetAnchr2
_cpGrooveJointGetGrooveA
_cpGrooveJointGetGrooveB

_cpPinJointGetAnchr1
_cpPinJointGetAnchr2
_cpPinJointGetDist
_cpPinJointSetAnchr1
_cpPinJointSetAnchr2
_cpPinJointSetDist

_cpPivotJointGetAnchr1
_cpPivotJointGetAnchr2
_cpPivotJointSetAnchr1
_cpPivotJointSetAnchr2

_cpRatchetJointGetAngle
_cpRatchetJointGetPhase
_cpRatchetJointGetRatchet
_cpRatchetJointSetAngle
_cpRatchetJointSetPhase
_cpRatchetJointSetRatchet

_cpRotaryLimitJointGetMin
_cpRotaryLimitJointGetMax
_cpRotaryLimitJointSetMin
_cpRotaryLimitJointSetMax

_cpSimpleMotorGetRate
_cpSimpleMotorSetRate

_cpSlideJointGetAnchr1
_cpSlideJointGetAnchr2
_cpSlideJointGetMin
_cpSlideJointGetMax

_cpSlideJointSetAnchr1
_cpSlideJointSetAnchr2
_cpSlideJointSetMin
_cpSlideJointSetMax

_cpSegmentQueryHitPoint
_cpSegmentQueryHitDist

_cpSpatialIndexDestroy
_cpSpatialIndexCount
_cpSpatialIndexEach
_cpSpatialIndexContains
_cpSpatialIndexInsert
_cpSpatialIndexRemove
_cpSpatialIndexReindex
_cpSpatialIndexReindexObject
_cpSpatialIndexPointQuery
_cpSpatialIndexSegmentQuery
_cpSpatialIndexQuery
_cpSpatialIndexReindexQuery

_cpSpaceGetIterations
_cpSpaceGetGravity
_cpSpaceGetDamping
_cpSpaceGetIdleSpeedThreshold
_cpSpaceGetSleepTimeThreshold
_cpSpaceGetCollisionSlop
_cpSpaceGetCollisionBias
_cpSpaceGetCollisionPersistence
_cpSpaceGetEnableContactGraph
_cpSpaceGetUserData

_cpSpaceSetIterations
_cpSpaceSetGravity
_cpSpaceSetDamping
_cpSpaceSetIdleSpeedThreshold
_cpSpaceSetSleepTimeThreshold
_cpSpaceSetCollisionSlop
_cpSpaceSetCollisionBias
_cpSpaceSetCollisionPersistence
_cpSpaceSetEnableContactGraph
_cpSpaceSetUserData

_cpSpaceGetStaticBody
_cpSpaceGetCurrentTimeStep
_cpSpaceIsLocked
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
User avatar
aisman
 
Posts: 143
Joined: Tue Mar 04, 2008 2:21 am

Re: Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Postby slembcke » Sun Dec 18, 2011 5:21 pm

Oh, shoot. I forgot to check if the MSVC project was up to date before releasing that. :-\
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Postby roflha » Tue Dec 20, 2011 6:36 am

I am not sure why, but this .def file is not working for me on the vc2010 project file.

When I try to compile in either of the DLL builds, I receive a bunch of lines like
1>chipmunk.def : error LNK2001: unresolved external symbol _cpArbiterGetBodies

All I did was created a file named chipmunk.def and put it in the Chipmunk-6.0.3\msvc\vc10\chipmunk folder. I then tried to build it with vs2010 and, well, I already said that part.

Any advice?
roflha
 
Posts: 4
Joined: Tue Dec 20, 2011 6:28 am

Re: Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Postby aisman » Tue Dec 20, 2011 2:23 pm

Of course you have to define the CHIPMUNK_FFI preprocessor flag: add it to the preprocesser section on VS2010
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
User avatar
aisman
 
Posts: 143
Joined: Tue Mar 04, 2008 2:21 am

Re: Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Postby roflha » Tue Dec 20, 2011 3:22 pm

Ah thank you, didn't know I had to do that.
Edit: Similar question, I can compile the library now, but the demo will not compile for me. I added the same preprocessor definition into the demo project as I did the chipmunk project, but now I am getting
"2>Bench.obj : error LNK2001: unresolved external symbol _cpSpaceNew"

I also tried adding the chipmunk.lib as an additional linker dependency but that failed too.
roflha
 
Posts: 4
Joined: Tue Dec 20, 2011 6:28 am

Re: Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Postby aisman » Wed Dec 21, 2011 3:22 pm

Compile Chipmunk and Demo as static lib anf you will get the demo.exe
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
User avatar
aisman
 
Posts: 143
Joined: Tue Mar 04, 2008 2:21 am

Re: Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Postby hamlatzis » Wed Jan 04, 2012 6:45 am

Similar problem with MS Visual Studio 2005 Prof and MS Visual Studio 2008 Express. DLL doesn't link with infinite unresolved externals.

If I create as suggested as a library then the demo has some unresolved externals

1>ChipmunkDemo.obj : error LNK2001: unresolved external symbol "int bench_count" (?bench_count@@3HA)
1>ChipmunkDemo.obj : error LNK2001: unresolved external symbol "struct ChipmunkDemo * bench_list" (?bench_list@@3PAUChipmunkDemo@@A)
1>ChipmunkDemo.obj : error LNK2001: unresolved external symbol "struct ChipmunkDemo Slice" (?Slice@@3UChipmunkDemo@@A)
1>ChipmunkDemo.obj : error LNK2001: unresolved external symbol "struct ChipmunkDemo Buoyancy" (?Buoyancy@@3UChipmunkDemo@@A)
1>ChipmunkDemo.obj : error LNK2001: unresolved external symbol "struct ChipmunkDemo ContactGraph" (?ContactGraph@@3UChipmunkDemo@@A)
1>ChipmunkDemo.obj : error LNK2001: unresolved external symbol "struct ChipmunkDemo Crane" (?Crane@@3UChipmunkDemo@@A)
1>ChipmunkDemo.obj : error LNK2001: unresolved external symbol "struct ChipmunkDemo Chains" (?Chains@@3UChipmunkDemo@@A)
1>ChipmunkDemo.obj : error LNK2001: unresolved external symbol "struct ChipmunkDemo BouncyHexagons" (?BouncyHexagons@@3UChipmunkDemo@@A)
1>chipmunk.lib(cpSpace.obj) : error LNK2019: unresolved external symbol _cpBBTreeSetVelocityFunc referenced in function _cpSpaceInit
1>chipmunk.lib(cpSpace.obj) : error LNK2019: unresolved external symbol _cpBBTreeNew referenced in function _cpSpaceInit
1>chipmunk.lib(cpSpace.obj) : error LNK2019: unresolved external symbol _cpSpatialIndexFree referenced in function _cpSpaceDestroy
1>chipmunk.lib(cpSpaceHash.obj) : error LNK2019: unresolved external symbol "struct cpSpatialIndex * __cdecl cpSpatialIndexInit(struct cpSpatialIndex *,struct cpSpatialIndexClass *,struct cpBB (__cdecl*)(void *),struct cpSpatialIndex *)" (?cpSpatialIndexInit@@YAPAUcpSpatialIndex@@PAU1@PAUcpSpatialIndexClass@@P6A?AUcpBB@@PAX@Z0@Z) referenced in function _cpSpaceHashInit
1>chipmunk.lib(cpSpaceHash.obj) : error LNK2019: unresolved external symbol _cpSpatialIndexCollideStatic referenced in function "void __cdecl cpSpaceHashReindexQuery(struct cpSpaceHash *,void (__cdecl*)(void *,void *,void *),void *)" (?cpSpaceHashReindexQuery@@YAXPAUcpSpaceHash@@P6AXPAX11@Z1@Z)
1>Debug DLL\demo.exe : fatal error LNK1120: 13 unresolved externals
hamlatzis
 
Posts: 2
Joined: Wed Jan 04, 2012 6:14 am

Re: Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Postby slembcke » Wed Jan 04, 2012 12:32 pm

It looks like you aren't linking the demo modules maybe? Make sure all the other source files in the Demo/ directory are being linked.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Chipmunk.def for 6.0.3 and VisualStudio 2010/09

Postby chrisanderman » Sat Feb 04, 2012 3:12 am

I had the same problem, and as it turns out the solution is simple. Slice.c is missing from the msvc 2010 project file. Oops! Someone must have forgot to add it.

To fix this just go to demo->Source Files. Right click Source Files and click Add->Existing Item. In the browser navigate up one folder, then go into the Demo folder and double-click on Slice.c.

It should build fine now. I'm going to submit this as a bug unless it has already been reported.
chrisanderman
 
Posts: 2
Joined: Sat Feb 04, 2012 3:09 am


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 0 guests

cron