How To Use Chipmunk in Visual C++ '08 for your own Projects
-
- Posts: 114
- Joined: Sat Mar 07, 2009 7:23 am
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
Unable to compile latest trunk version under msvc 2005. file chipmunk.c.
#define MAKE_REF(name) __typeof__(name) *_##name = name;
msvc hasn't __typeof__ operator or any equvalent of it.
#define MAKE_REF(name) __typeof__(name) *_##name = name;
msvc hasn't __typeof__ operator or any equvalent of it.
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
Seriously? Well, whatever. Those were just meant to be gettable symbols for FFIs anyway. Will work to just assign them to a void pointer.ShiftZ wrote:msvc hasn't __typeof__ operator or any equvalent of it.
Will this break things for MSVC 2005 users? Any chance I could get this as a patch so I can see what has changed easily?fk1985 wrote:Anyway, I modified the code to work with Visual Studio 2008.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 7
- Joined: Tue Dec 15, 2009 12:50 pm
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
I "diffed" the two directories. I'm pretty sure it will also work with VS 2005.
Hint: read the diff.txt file with highlighting for C/C++
Hint: read the diff.txt file with highlighting for C/C++
Code: Select all
diff -r Chipmunk-5.0.0/Demo/Bounce.c Chipmunk-5.0.0old/Demo/Bounce.c
30,31c30,31
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
118c118
< chipmunkDemo Bounce = {
---
> const chipmunkDemo Bounce = {
diff -r Chipmunk-5.0.0/Demo/ChipmunkDemo.c Chipmunk-5.0.0old/Demo/ChipmunkDemo.c
47,51c47
< #include <GL/gl.h>
< #include <../MSVCSolution/glext.h>
< #include <GL/glu.h>
< #include <../MSVCSolution/glut.h>
< #else
---
> #endif
57d52
< #endif
195c190
< printf(buffer, 1000, format,
---
> snprintf(buffer, 1000, format,
229c224
< printf(title, "Demo: %s", demo->name);
---
> sprintf(title, "Demo: %s", demo->name);
diff -r Chipmunk-5.0.0/Demo/Joints.c Chipmunk-5.0.0old/Demo/Joints.c
30,31c30,31
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
290c290
< chipmunkDemo Joints = {
---
> const chipmunkDemo Joints = {
diff -r Chipmunk-5.0.0/Demo/LogoSmash.c Chipmunk-5.0.0old/Demo/LogoSmash.c
76c76
< extern cpSpace *space;
---
> cpSpace *space;
146c146
< chipmunkDemo LogoSmash = {
---
> const chipmunkDemo LogoSmash = {
diff -r Chipmunk-5.0.0/Demo/MagnetsElectric.c Chipmunk-5.0.0old/Demo/MagnetsElectric.c
73,74c73,74
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
458c458
< srand((unsigned int)time(NULL));
---
> srand(time(NULL));
500c500
< chipmunkDemo MagnetsElectric = {
---
> const chipmunkDemo MagnetsElectric = {
diff -r Chipmunk-5.0.0/Demo/OneWay.c Chipmunk-5.0.0old/Demo/OneWay.c
30,31c30,31
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
44c44
< OneWayPlatform *platform = (OneWayPlatform*)a->data;
---
> OneWayPlatform *platform = a->data;
146c146
< chipmunkDemo OneWay = {
---
> const chipmunkDemo OneWay = {
diff -r Chipmunk-5.0.0/Demo/Planet.c Chipmunk-5.0.0old/Demo/Planet.c
30,31c30,31
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
121c121
< chipmunkDemo Planet = {
---
> const chipmunkDemo Planet = {
diff -r Chipmunk-5.0.0/Demo/Player.c Chipmunk-5.0.0old/Demo/Player.c
30,31c30,31
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
46c46
< PlayerStruct *player = (PlayerStruct*)a->data;
---
> PlayerStruct *player = a->data;
60c60
< PlayerStruct *player = (PlayerStruct*)a->data;
---
> PlayerStruct *player = a->data;
79c79
< PlayerStruct *player = (PlayerStruct*)a->data;
---
> PlayerStruct *player = a->data;
221c221
< chipmunkDemo Player = {
---
> const chipmunkDemo Player = {
diff -r Chipmunk-5.0.0/Demo/Plink.c Chipmunk-5.0.0old/Demo/Plink.c
120c120
< chipmunkDemo Plink = {
---
> const chipmunkDemo Plink = {
diff -r Chipmunk-5.0.0/Demo/Pump.c Chipmunk-5.0.0old/Demo/Pump.c
32c32
< extern cpConstraint *motor;
---
> cpConstraint *motor;
182c182
< chipmunkDemo Pump = {
---
> const chipmunkDemo Pump = {
diff -r Chipmunk-5.0.0/Demo/PyramidStack.c Chipmunk-5.0.0old/Demo/PyramidStack.c
30,31c30,31
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
112c112
< chipmunkDemo PyramidStack = {
---
> const chipmunkDemo PyramidStack = {
diff -r Chipmunk-5.0.0/Demo/PyramidTopple.c Chipmunk-5.0.0old/Demo/PyramidTopple.c
30,31c30,31
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
135c135
< chipmunkDemo PyramidTopple = {
---
> const chipmunkDemo PyramidTopple = {
diff -r Chipmunk-5.0.0/Demo/Query.c Chipmunk-5.0.0old/Demo/Query.c
119,120c119
< cpVect* verts = (cpVect*)malloc(sizeof(cpVect)*NUM_VERTS);
<
---
> cpVect verts[NUM_VERTS];
153c152
< chipmunkDemo Query = {
---
> const chipmunkDemo Query = {
diff -r Chipmunk-5.0.0/Demo/Sensors.c Chipmunk-5.0.0old/Demo/Sensors.c
30,31c30,31
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
51c51
< Emitter *emitter = (Emitter*)a->data;
---
> Emitter *emitter = a->data;
62c62
< Emitter *emitter = (Emitter*)a->data;
---
> Emitter *emitter = a->data;
81c81
< Emitter *emitter = (Emitter*)a->data;
---
> Emitter *emitter = a->data;
159c159
< chipmunkDemo Sensors = {
---
> const chipmunkDemo Sensors = {
diff -r Chipmunk-5.0.0/Demo/Simple.c Chipmunk-5.0.0old/Demo/Simple.c
30,31c30,31
< extern cpSpace *space;
< extern cpBody *staticBody;
---
> cpSpace *space;
> cpBody *staticBody;
109c109
< chipmunkDemo Simple = {
---
> const chipmunkDemo Simple = {
diff -r Chipmunk-5.0.0/Demo/Springies.c Chipmunk-5.0.0old/Demo/Springies.c
169c169
< chipmunkDemo Springies = {
---
> const chipmunkDemo Springies = {
diff -r Chipmunk-5.0.0/Demo/TheoJansen.c Chipmunk-5.0.0old/Demo/TheoJansen.c
175c175
< chipmunkDemo TheoJansen = {
---
> const chipmunkDemo TheoJansen = {
diff -r Chipmunk-5.0.0/Demo/Tumble.c Chipmunk-5.0.0old/Demo/Tumble.c
127c127
< chipmunkDemo Tumble = {
---
> const chipmunkDemo Tumble = {
diff -r Chipmunk-5.0.0/Demo/UnsafeOps.c Chipmunk-5.0.0old/Demo/UnsafeOps.c
110c110
< chipmunkDemo UnsafeOps = {
---
> const chipmunkDemo UnsafeOps = {
diff -r Chipmunk-5.0.0/Demo/drawSpace.c Chipmunk-5.0.0old/Demo/drawSpace.c
37c37
< #include <../MSVCSolution/glext.h>
---
> #include <GL/glext.h>
39c39
< #include <../MSVCSolution/glut.h>
---
> #include <GL/glut.h>
229c229
< GLfloat* VAR = (GLfloat*)malloc(sizeof(GLfloat)*(count*2));
---
> GLfloat VAR[count*2];
476c476
< drawConstraint((cpConstraint*)constraints->arr[i]);
---
> drawConstraint(constraints->arr[i]);
diff -r Chipmunk-5.0.0/MSVCSolution/Chipmunk4MSVC2k3/ChipmunkMSVC.vcproj Chipmunk-5.0.0old/MSVCSolution/Chipmunk4MSVC2k3/ChipmunkMSVC.vcproj
4c4
< Version="9.00"
---
> Version="7.10"
8,10c8
< Keyword="Win32Proj"
< TargetFrameworkVersion="131072"
< >
---
> Keyword="Win32Proj">
13,14c11
< Name="Win32"
< />
---
> Name="Win32"/>
16,17d12
< <ToolFiles>
< </ToolFiles>
24,41c19
< InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
< CharacterSet="1"
< >
< <Tool
< Name="VCPreBuildEventTool"
< />
< <Tool
< Name="VCCustomBuildTool"
< />
< <Tool
< Name="VCXMLDataGeneratorTool"
< />
< <Tool
< Name="VCWebServiceProxyGeneratorTool"
< />
< <Tool
< Name="VCMIDLTool"
< />
---
> CharacterSet="1">
47c25
< MinimalRebuild="true"
---
> MinimalRebuild="TRUE"
52c30
< Detect64BitPortabilityProblems="true"
---
> Detect64BitPortabilityProblems="TRUE"
54,61c32
< CompileAs="2"
< />
< <Tool
< Name="VCManagedResourceCompilerTool"
< />
< <Tool
< Name="VCResourceCompilerTool"
< />
---
> CompileAs="2"/>
63,64c34
< Name="VCPreLinkEventTool"
< />
---
> Name="VCCustomBuildTool"/>
71c41
< GenerateDebugInformation="true"
---
> GenerateDebugInformation="TRUE"
73,76c43
< RandomizedBaseAddress="1"
< DataExecutionPrevention="0"
< TargetMachine="1"
< />
---
> TargetMachine="1"/>
78,79c45
< Name="VCALinkTool"
< />
---
> Name="VCMIDLTool"/>
81,82c47
< Name="VCManifestTool"
< />
---
> Name="VCPostBuildEventTool"/>
84,85c49
< Name="VCXDCMakeTool"
< />
---
> Name="VCPreBuildEventTool"/>
87,88c51
< Name="VCBscMakeTool"
< />
---
> Name="VCPreLinkEventTool"/>
90,91c53
< Name="VCFxCopTool"
< />
---
> Name="VCResourceCompilerTool"/>
93,94c55
< Name="VCAppVerifierTool"
< />
---
> Name="VCWebServiceProxyGeneratorTool"/>
96,97c57,63
< Name="VCPostBuildEventTool"
< />
---
> Name="VCXMLDataGeneratorTool"/>
> <Tool
> Name="VCWebDeploymentTool"/>
> <Tool
> Name="VCManagedWrapperGeneratorTool"/>
> <Tool
> Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
104d69
< InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
106,122c71
< WholeProgramOptimization="1"
< >
< <Tool
< Name="VCPreBuildEventTool"
< />
< <Tool
< Name="VCCustomBuildTool"
< />
< <Tool
< Name="VCXMLDataGeneratorTool"
< />
< <Tool
< Name="VCWebServiceProxyGeneratorTool"
< />
< <Tool
< Name="VCMIDLTool"
< />
---
> WholeProgramOptimization="TRUE">
126c75
< EnableIntrinsicFunctions="false"
---
> EnableIntrinsicFunctions="FALSE"
128c77
< WholeProgramOptimization="false"
---
> WholeProgramOptimization="FALSE"
131c80
< MinimalRebuild="true"
---
> MinimalRebuild="TRUE"
136c85
< Detect64BitPortabilityProblems="false"
---
> Detect64BitPortabilityProblems="TRUE"
138,142c87
< CompileAs="2"
< />
< <Tool
< Name="VCManagedResourceCompilerTool"
< />
---
> CompileAs="2"/>
144,148c89
< Name="VCResourceCompilerTool"
< />
< <Tool
< Name="VCPreLinkEventTool"
< />
---
> Name="VCCustomBuildTool"/>
154c95
< GenerateDebugInformation="true"
---
> GenerateDebugInformation="TRUE"
158,161c99,102
< RandomizedBaseAddress="1"
< DataExecutionPrevention="0"
< TargetMachine="1"
< />
---
> LinkTimeCodeGeneration="FALSE"
> TargetMachine="1"/>
> <Tool
> Name="VCMIDLTool"/>
163,164c104
< Name="VCALinkTool"
< />
---
> Name="VCPostBuildEventTool"/>
166,167c106
< Name="VCManifestTool"
< />
---
> Name="VCPreBuildEventTool"/>
169,170c108
< Name="VCXDCMakeTool"
< />
---
> Name="VCPreLinkEventTool"/>
172,173c110
< Name="VCBscMakeTool"
< />
---
> Name="VCResourceCompilerTool"/>
175,176c112
< Name="VCFxCopTool"
< />
---
> Name="VCWebServiceProxyGeneratorTool"/>
178,179c114
< Name="VCAppVerifierTool"
< />
---
> Name="VCXMLDataGeneratorTool"/>
181,182c116,120
< Name="VCPostBuildEventTool"
< />
---
> Name="VCWebDeploymentTool"/>
> <Tool
> Name="VCManagedWrapperGeneratorTool"/>
> <Tool
> Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
191,240c129
< UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
< >
< <File
< RelativePath="..\..\Demo\Bounce.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\ChipmunkDemo.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\ChipmunkDemo.h"
< >
< </File>
< <File
< RelativePath="..\..\Demo\drawSpace.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\drawSpace.h"
< >
< </File>
< <File
< RelativePath="..\..\Demo\Joints.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\LogoSmash.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\MagnetsElectric.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\OneWay.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\Planet.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\Player.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\Plink.c"
< >
< </File>
---
> UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
242,243c131
< RelativePath="..\..\Demo\Pump.c"
< >
---
> RelativePath="..\..\Demo\Demo1.c">
246,247c134,206
< RelativePath="..\..\Demo\PyramidStack.c"
< >
---
> RelativePath="..\..\Demo\Demo2.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\Demo\Demo3.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\Demo\Demo4.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\Demo\Demo5.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\Demo\Demo6.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
250,251c209
< RelativePath="..\..\Demo\PyramidTopple.c"
< >
---
> RelativePath="..\..\Demo\Demo7.c">
254,279c212
< RelativePath="..\..\Demo\Query.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\Sensors.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\Simple.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\Springies.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\TheoJansen.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\Tumble.c"
< >
< </File>
< <File
< RelativePath="..\..\Demo\UnsafeOps.c"
< >
---
> RelativePath="..\..\Demo\main.c">
283,284c216
< Name="Chipmunk"
< >
---
> Name="Chipmunk">
286,287c218
< Name="Header"
< >
---
> Name="Header">
289,290c220
< RelativePath="..\..\src\chipmunk.h"
< >
---
> RelativePath="..\..\src\chipmunk.h">
293,294c223
< RelativePath="..\..\src\chipmunk_types.h"
< >
---
> RelativePath="..\..\src\cpArbiter.h">
297,298c226
< RelativePath="..\..\src\chipmunk_unsafe.h"
< >
---
> RelativePath="..\..\src\cpArray.h">
301,302c229
< RelativePath="..\..\src\cpArbiter.h"
< >
---
> RelativePath="..\..\src\cpBB.h">
305,306c232
< RelativePath="..\..\src\cpArray.h"
< >
---
> RelativePath="..\..\src\cpBody.h">
309,310c235
< RelativePath="..\..\src\cpBB.h"
< >
---
> RelativePath="..\..\src\cpCollision.h">
313,314c238
< RelativePath="..\..\src\cpBody.h"
< >
---
> RelativePath="..\..\src\cpHashSet.h">
317,318c241
< RelativePath="..\..\src\cpCollision.h"
< >
---
> RelativePath="..\..\src\cpJoint.h">
321,322c244
< RelativePath="..\..\src\cpHashSet.h"
< >
---
> RelativePath="..\..\src\cpPolyShape.h">
325,326c247
< RelativePath="..\..\src\cpPolyShape.h"
< >
---
> RelativePath="..\..\src\cpShape.h">
329,330c250
< RelativePath="..\..\src\cpShape.h"
< >
---
> RelativePath="..\..\src\cpSpace.h">
333,334c253
< RelativePath="..\..\src\cpSpace.h"
< >
---
> RelativePath="..\..\src\cpSpaceHash.h">
337,338c256
< RelativePath="..\..\src\cpSpaceHash.h"
< >
---
> RelativePath="..\..\src\cpVect.h">
341,346c259
< RelativePath="..\..\src\cpVect.h"
< >
< </File>
< <File
< RelativePath="..\..\src\prime.h"
< >
---
> RelativePath="..\..\src\prime.h">
350,351c263
< Name="Source"
< >
---
> Name="Source">
353,354c265,457
< RelativePath="..\..\src\chipmunk.c"
< >
---
> RelativePath="..\..\src\chipmunk.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpArbiter.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpArray.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpBB.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpBody.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpCollision.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpHashSet.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpJoint.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpPolyShape.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpShape.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpSpace.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpSpaceHash.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> </File>
> <File
> RelativePath="..\..\src\cpVect.c">
> <FileConfiguration
> Name="Debug|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
> <FileConfiguration
> Name="Release|Win32">
> <Tool
> Name="VCCLCompilerTool"
> CompileAs="2"/>
> </FileConfiguration>
356,495d458
< <File
< RelativePath="..\..\src\cpArbiter.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpArray.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpBB.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpBody.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpCollision.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpHashSet.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpPolyShape.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpShape.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpSpace.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpSpaceHash.c"
< >
< </File>
< <File
< RelativePath="..\..\src\cpVect.c"
< >
< </File>
< <Filter
< Name="constraints"
< >
< <File
< RelativePath="..\..\src\constraints\cpConstraint.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpConstraint.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpDampedRotarySpring.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpDampedRotarySpring.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpDampedSpring.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpDampedSpring.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpGearJoint.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpGearJoint.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpGrooveJoint.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpGrooveJoint.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpPinJoint.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpPinJoint.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpPivotJoint.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpPivotJoint.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpRatchetJoint.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpRatchetJoint.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpRotaryLimitJoint.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpRotaryLimitJoint.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpSimpleMotor.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpSimpleMotor.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpSlideJoint.c"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\cpSlideJoint.h"
< >
< </File>
< <File
< RelativePath="..\..\src\constraints\util.h"
< >
< </File>
< </Filter>
Only in Chipmunk-5.0.0/MSVCSolution/Chipmunk4MSVC2k3: ChipmunkMSVC.vcproj.DOPE.manf.user
Only in Chipmunk-5.0.0/MSVCSolution/Chipmunk4MSVC2k3: Release
diff -r Chipmunk-5.0.0/MSVCSolution/Chipmunk4MSVC2k3.sln Chipmunk-5.0.0old/MSVCSolution/Chipmunk4MSVC2k3.sln
1,2c1
< Microsoft Visual Studio Solution File, Format Version 10.00
< # Visual Studio 2008
---
> Microsoft Visual Studio Solution File, Format Version 8.00
3a3,4
> ProjectSection(ProjectDependencies) = postProject
> EndProjectSection
5a7,20
> GlobalSection(SolutionConfiguration) = preSolution
> Debug = Debug
> Release = Release
> EndGlobalSection
> GlobalSection(ProjectConfiguration) = postSolution
> {F61CF011-DFBE-4FAD-9CAF-A62C0240616D}.Debug.ActiveCfg = Debug|Win32
> {F61CF011-DFBE-4FAD-9CAF-A62C0240616D}.Debug.Build.0 = Debug|Win32
> {F61CF011-DFBE-4FAD-9CAF-A62C0240616D}.Release.ActiveCfg = Release|Win32
> {F61CF011-DFBE-4FAD-9CAF-A62C0240616D}.Release.Build.0 = Release|Win32
> EndGlobalSection
> GlobalSection(ExtensibilityGlobals) = postSolution
> EndGlobalSection
> GlobalSection(ExtensibilityAddIns) = postSolution
> EndGlobalSection
Files Chipmunk-5.0.0/MSVCSolution/Chipmunk4MSVC2k3.suo and Chipmunk-5.0.0old/MSVCSolution/Chipmunk4MSVC2k3.suo differ
Only in Chipmunk-5.0.0/MSVCSolution: UpgradeLog.XML
Only in Chipmunk-5.0.0/MSVCSolution: _UpgradeReport_Files
Only in Chipmunk-5.0.0/MSVCSolution: bin
Only in Chipmunk-5.0.0/MSVCSolution: glext.h
diff -r Chipmunk-5.0.0/src/chipmunk.c Chipmunk-5.0.0old/src/chipmunk.c
87,119c87,119
< //#define MAKE_REF(name) __typeof__(name) *_##name = name;
< //MAKE_REF(cpv); // makes a variable named _cpv that contains the function pointer for cpv()
< //MAKE_REF(cpvadd);
< //MAKE_REF(cpvneg);
< //MAKE_REF(cpvsub);
< //MAKE_REF(cpvmult);
< //MAKE_REF(cpvdot);
< //MAKE_REF(cpvcross);
< //MAKE_REF(cpvperp);
< //MAKE_REF(cpvrperp);
< //MAKE_REF(cpvproject);
< //MAKE_REF(cpvrotate);
< //MAKE_REF(cpvunrotate);
< //MAKE_REF(cpvlengthsq);
< //MAKE_REF(cpvlerp);
< //MAKE_REF(cpvnormalize);
< //MAKE_REF(cpvnormalize_safe);
< //MAKE_REF(cpvclamp);
< //MAKE_REF(cpvlerpconst);
< //MAKE_REF(cpvdist);
< //MAKE_REF(cpvnear);
< //MAKE_REF(cpvdistsq);
< //
< //MAKE_REF(cpBBNew);
< //MAKE_REF(cpBBintersects);
< //MAKE_REF(cpBBcontainsBB);
< //MAKE_REF(cpBBcontainsVect);
< //MAKE_REF(cpBBmerge);
< //MAKE_REF(cpBBexpand);
< //
< //MAKE_REF(cpBodyWorld2Local);
< //MAKE_REF(cpBodyLocal2World);
< //MAKE_REF(cpBodyApplyImpulse);
---
> #define MAKE_REF(name) __typeof__(name) *_##name = name;
> MAKE_REF(cpv); // makes a variable named _cpv that contains the function pointer for cpv()
> MAKE_REF(cpvadd);
> MAKE_REF(cpvneg);
> MAKE_REF(cpvsub);
> MAKE_REF(cpvmult);
> MAKE_REF(cpvdot);
> MAKE_REF(cpvcross);
> MAKE_REF(cpvperp);
> MAKE_REF(cpvrperp);
> MAKE_REF(cpvproject);
> MAKE_REF(cpvrotate);
> MAKE_REF(cpvunrotate);
> MAKE_REF(cpvlengthsq);
> MAKE_REF(cpvlerp);
> MAKE_REF(cpvnormalize);
> MAKE_REF(cpvnormalize_safe);
> MAKE_REF(cpvclamp);
> MAKE_REF(cpvlerpconst);
> MAKE_REF(cpvdist);
> MAKE_REF(cpvnear);
> MAKE_REF(cpvdistsq);
>
> MAKE_REF(cpBBNew);
> MAKE_REF(cpBBintersects);
> MAKE_REF(cpBBcontainsBB);
> MAKE_REF(cpBBcontainsVect);
> MAKE_REF(cpBBmerge);
> MAKE_REF(cpBBexpand);
>
> MAKE_REF(cpBodyWorld2Local);
> MAKE_REF(cpBodyLocal2World);
> MAKE_REF(cpBodyApplyImpulse);
diff -r Chipmunk-5.0.0/src/cpSpace.c Chipmunk-5.0.0old/src/cpSpace.c
32c32
< //#pragma mark Contact Set Helpers
---
> #pragma mark Contact Set Helpers
51c51
< ////#pragma mark Collision Pair Function Helpers
---
> #pragma mark Collision Pair Function Helpers
70c70
< //#pragma mark Post Step Function Helpers
---
> #pragma mark Post Step Function Helpers
92c92
< //#pragma mark Misc Helper Funcs
---
> #pragma mark Misc Helper Funcs
108c108
< //#pragma mark Memory Management Functions
---
> #pragma mark Memory Management Functions
198c198
< //#pragma mark Collision Handler Function Management
---
> #pragma mark Collision Handler Function Management
229c229
< cpCollisionHandler *old_handler = (cpCollisionHandler*)cpHashSetRemove(space->collFuncSet, CP_HASH_PAIR(a, b), &ids);
---
> cpCollisionHandler *old_handler = cpHashSetRemove(space->collFuncSet, CP_HASH_PAIR(a, b), &ids);
255c255
< //#pragma mark Body, Shape, and Joint Management
---
> #pragma mark Body, Shape, and Joint Management
331c331
< //#pragma mark Post Step Functions
---
> #pragma mark Post Step Functions
353c353
< //#pragma mark Point Query Functions
---
> #pragma mark Point Query Functions
405c405
< //#pragma mark Segment Query Functions
---
> #pragma mark Segment Query Functions
499c499
< //#pragma mark Spatial Hash Management
---
> #pragma mark Spatial Hash Management
528c528
< //#pragma mark Collision Detection Functions
---
> #pragma mark Collision Detection Functions
628c628
< //#pragma mark All Important cpSpaceStep() Function
---
> #pragma mark All Important cpSpaceStep() Function
706c706
< cpArbiter *arb = (cpArbiter*)arbiters->arr[i];
---
> cpArbiter *arb = arbiters->arr[i];
-
- Posts: 17
- Joined: Fri Oct 12, 2007 8:59 pm
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
Thanks FK, you're version worked. I just had to delete the "release" folder before compiling.
The new version rocks! so many cool things to play with.
The new version rocks! so many cool things to play with.
-
- Posts: 2
- Joined: Mon Jan 11, 2010 9:44 am
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
In Chipmunk-5.0.0 there is no \Demo\Demo1.c, Demo2.c ... and main.c.
And Chipmunk4MSVC2k3.sln not works. Plz fix it for VC++ 2008.
And Chipmunk4MSVC2k3.sln not works. Plz fix it for VC++ 2008.
-
- Posts: 145
- Joined: Tue Mar 04, 2008 2:21 am
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
The diff works also for the 5.1.0.
So I can try write new 2D pysic games with PureBasic and Chipmunk 5.1.0
Thanks.
So I can try write new 2D pysic games with PureBasic and Chipmunk 5.1.0
Thanks.
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
-
- Posts: 114
- Joined: Sat Mar 07, 2009 7:23 am
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
Compiled latest trunk on msvc08 and have got only two similar errors:
..\..\SDK\Chipmunk\cpSpace.c(233) : error C2440: 'initializing' : cannot convert from 'void *' to 'cpCollisionHandler *'
..\..\SDK\Chipmunk\cpSpace.c(748) : error C2440: 'initializing' : cannot convert from 'void *' to 'cpArbiter *'
Just explicit cast is reaquired from void*.
..\..\SDK\Chipmunk\cpSpace.c(233) : error C2440: 'initializing' : cannot convert from 'void *' to 'cpCollisionHandler *'
..\..\SDK\Chipmunk\cpSpace.c(748) : error C2440: 'initializing' : cannot convert from 'void *' to 'cpArbiter *'
Just explicit cast is reaquired from void*.
-
- Posts: 1
- Joined: Fri May 21, 2010 2:57 pm
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
Can someone tell me how to integrate Chipmunk with Visual Studio. I'm still getting compiler errors, even in header files.
- Tam Toucan
- Posts: 141
- Joined: Tue Jun 23, 2009 4:26 pm
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
Can you tell us the errors so we have clue as to what is wrong?
-
- Posts: 2
- Joined: Thu Jun 10, 2010 5:55 pm
- Contact:
Re: How To Use Chipmunk in Visual C++ '08 for your own Projects
I've just downloaded the latest as of 10/06/2010 and I cannot get anything to compile properly on msvc 2010 express edition:
1. Demo1..7.c and main.c do not exist in .tar. They don't exist in any of the v5 stuff, so browsed in reverse-chronological order through the .tars until I got to the last v4, which I found these files.
2. Demo1.c and Demo6.c call "cpSpaceAddCollisionPairFunc" which doesn't appear to exist any longer.
I also added all the search paths to look in the include and src directories, but I'm still getting a swathe of errors. Here's the first batch:
1>..\..\Demo\Demo7.c(33) : error C2143: syntax error : missing ';' before '*'
1>..\..\Demo\Demo7.c(33) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Demo\Demo7.c(33) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Demo\Demo7.c(45) : error C2661: 'cpDampedSpring::cpDampedSpring' : no overloaded function takes 8 arguments
1>..\..\Demo\Demo7.c(46) : error C2661: 'cpDampedSpring::cpDampedSpring' : no overloaded function takes 8 arguments
1>..\..\Demo\Demo7.c(125) : error C2440: '=' : cannot convert from 'cpConstraint *' to 'int *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>..\..\Demo\Demo7.c(126) : error C3861: 'cpSpaceAddJoint': identifier not found
1>..\..\Demo\Demo7.c(128) : error C2440: '=' : cannot convert from 'cpConstraint *' to 'int *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>..\..\Demo\Demo7.c(129) : error C3861: 'cpSpaceAddJoint': identifier not found
1
It goes on an on.
Now clearly, I'm doing something wrong here, but does anyone have any ideas what?
Regards,
thekanester
1. Demo1..7.c and main.c do not exist in .tar. They don't exist in any of the v5 stuff, so browsed in reverse-chronological order through the .tars until I got to the last v4, which I found these files.
2. Demo1.c and Demo6.c call "cpSpaceAddCollisionPairFunc" which doesn't appear to exist any longer.
I also added all the search paths to look in the include and src directories, but I'm still getting a swathe of errors. Here's the first batch:
1>..\..\Demo\Demo7.c(33) : error C2143: syntax error : missing ';' before '*'
1>..\..\Demo\Demo7.c(33) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Demo\Demo7.c(33) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>..\..\Demo\Demo7.c(45) : error C2661: 'cpDampedSpring::cpDampedSpring' : no overloaded function takes 8 arguments
1>..\..\Demo\Demo7.c(46) : error C2661: 'cpDampedSpring::cpDampedSpring' : no overloaded function takes 8 arguments
1>..\..\Demo\Demo7.c(125) : error C2440: '=' : cannot convert from 'cpConstraint *' to 'int *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>..\..\Demo\Demo7.c(126) : error C3861: 'cpSpaceAddJoint': identifier not found
1>..\..\Demo\Demo7.c(128) : error C2440: '=' : cannot convert from 'cpConstraint *' to 'int *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>..\..\Demo\Demo7.c(129) : error C3861: 'cpSpaceAddJoint': identifier not found
1
It goes on an on.
Now clearly, I'm doing something wrong here, but does anyone have any ideas what?
Regards,
thekanester
Who is online
Users browsing this forum: No registered users and 18 guests