Just wondering if anyone had successfully built the Ruby extension under Win32. I've been using Chipmunk on OSX and am really impressed, but having a Win32 version would be a great help as well.
I'm using the One-Click installer for Ruby and have tried compiling under MinGW and MSVS8. Using MinGW I run into problems with the Makefile generated - since Ruby generates an nmake compatible makefile which the MinGW make (gnu make) cannot understand. I managed to compile each file by hand using gcc, but ran out of luck at the linking stage. I can give the errors I got here if needed.
Under MSVS8 the Makefile parses fine but CL.exe complains at compilation (this is using the version I downloaded from slembke's last post in the other Win32 build thread):
http://www.slembcke.net/forums/viewtopi ... a&start=10
I've edited the Makefile to make CL compile as C++ rather than C, which gives less errors but maybe isn't the right way forward. Here is the nmake/CL output:
Code: Select all
E:\Microsoft Visual Studio 8\PSDK\ChipmunkMSVC\ruby>nmake
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
cl -nologo -I. -Ie:/ruby/lib/ruby/1.8/i386-mswin32 -Ie:/ruby/lib/ruby/1.
8/i386-mswin32 -I. -MD -Zi -O3b2xg- -G6 -std=gnu99 -c -Tprb_chipmunk.c
cl : Command line warning D9035 : option 'Og-' has been deprecated and will be r
emoved in a future release
cl : Command line warning D9002 : ignoring unknown option '-O3'
cl : Command line warning D9002 : ignoring unknown option '-G6'
cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
rb_chipmunk.c
e:\microsoft visual studio 8\psdk\chipmunkmsvc\ruby\rb_chipmunk.h(39) : error C2
440: 'initializing' : cannot convert from 'void *' to 'cpVect *'
Conversion from 'void*' to pointer to non-'void' requires an explicit ca
st
rb_chipmunk.c(69) : error C2057: expected constant expression
rb_chipmunk.c(69) : error C2466: cannot allocate an array of constant size 0
rb_chipmunk.c(69) : error C2133: 'verts' : unknown size
rb_chipmunk.c(93) : error C2664: 'rb_define_module_function' : cannot convert pa
rameter 3 from 'VALUE (__cdecl *)(VALUE)' to 'VALUE (__cdecl *)(...)'
None of the functions with this name in scope match the target type
rb_chipmunk.c(94) : error C2664: 'rb_define_module_function' : cannot convert pa
rameter 3 from 'VALUE (__cdecl *)(VALUE,VALUE)' to 'VALUE (__cdecl *)(...)'
None of the functions with this name in scope match the target type
rb_chipmunk.c(95) : error C2664: 'rb_define_module_function' : cannot convert pa
rameter 3 from 'VALUE (__cdecl *)(VALUE)' to 'VALUE (__cdecl *)(...)'
None of the functions with this name in scope match the target type
rb_chipmunk.c(96) : error C2664: 'rb_define_module_function' : cannot convert pa
rameter 3 from 'VALUE (__cdecl *)(VALUE,VALUE)' to 'VALUE (__cdecl *)(...)'
None of the functions with this name in scope match the target type
rb_chipmunk.c(98) : error C2664: 'rb_define_module_function' : cannot convert pa
rameter 3 from 'VALUE (__cdecl *)(VALUE,VALUE,VALUE,VALUE,VALUE)' to 'VALUE (__c
decl *)(...)'
None of the functions with this name in scope match the target type
rb_chipmunk.c(99) : error C2664: 'rb_define_module_function' : cannot convert pa
rameter 3 from 'VALUE (__cdecl *)(VALUE,VALUE,VALUE,VALUE)' to 'VALUE (__cdecl *
)(...)'
None of the functions with this name in scope match the target type
rb_chipmunk.c(101) : error C2664: 'rb_define_module_function' : cannot convert p
arameter 3 from 'VALUE (__cdecl *)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VAL
UE,VALUE)' to 'VALUE (__cdecl *)(...)'
None of the functions with this name in scope match the target type
NMAKE : fatal error U1077: '"E:\Microsoft Visual Studio 8\VC\BIN\cl.EXE"' : retu
rn code '0x2'
Stop.
AlexG