Native Extensions on Windows 0.10 series

Hi all,

I’ve just noticed that 0.10 is out and wanted to give it a try on
windows.
I’m not at all an VS C++ Developer so I might do something very stupid
here.

My env: Windows Server 2003
VS .NET 2003

On the command line with nmake from VC7 in the path this is what I get:

Attempting remote update of ferret
Building native extensions. This could take a while…

Microsoft (R) Program Maintenance Utility, Version 7.10.3077
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

NMAKE : fatal error U1077: ‘cl’: R³ckgabe-Code ‘0x2’
Stop.

Microsoft (R) Program Maintenance Utility, Version 7.10.3077
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

NMAKE : fatal error U1077: ‘cl’: R³ckgabe-Code ‘0x2’
Stop.

Microsoft (R) Program Maintenance Utility, Version 7.10.3077
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

ruby extconf.rb update ferret
creating Makefile

nmake
e:\programme\ruby\bin\ruby -e “puts ‘EXPORTS’,
‘Init_ferret_ext’” >
fer
ret_ext-i386-mswin32.def
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c
-Tcanalysis.c
analysis.c
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h(4)
:
fatal
error C1083: Include-Datei kann nicht geöffnet werden: ‘sys/types.h’: No
such fi
le or directory

nmake install
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c
-Tcanalysis.c
analysis.c
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h(4)
:
fatal
error C1083: Include-Datei kann nicht geöffnet werden: ‘sys/types.h’: No
such fi
le or directory

nmake clean
Successfully installed ferret-0.10.0
Installing ri documentation for ferret-0.10.0…
Installing RDoc documentation for ferret-0.10.0…
Gems: [ferret] updated

D:\Dokumente und Einstellungen\Administrator>


There are some other things happening while using the VS.NET command
line
which I assume includes the types.h correctly, that broke things on the
common command line in the first place:

So if someone got time to have a look this would be greatly appreciated.
Maybe even better would be a short README about how one has to configure
VS
to build this wonderful thingy…

Cheers,
Jan


VS .NET Command Line

D:\Dokumente und Einstellungen\Administrator>gem install ferret
Building native extensions. This could take a while…

Microsoft (R) Program Maintenance Utility, Version 7.10.3077
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

NMAKE : fatal error U1077: ‘cl’: R³ckgabe-Code ‘0x2’
Stop.

Microsoft (R) Program Maintenance Utility, Version 7.10.3077
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

NMAKE : fatal error U1077: ‘cl’: R³ckgabe-Code ‘0x2’
Stop.

Microsoft (R) Program Maintenance Utility, Version 7.10.3077
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

ruby extconf.rb install ferret
creating Makefile

nmake
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c
-Tcanalysis.c
analysis.c
e:\Programme\ruby\lib\ruby\1.8\i386-mswin32\config.h(76) : warning
C4005:
‘inlin
e’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h
(46)
: Siehe vorherige Definition von ‘inline’
E:\Programme\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(
98) : warning C4005: ‘ERROR’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\except.h
(71):
Siehe vorherige Definition von ‘ERROR’
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c -Tcapi.c
api.c
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c
-Tcarray.c
array.c
e:\Programme\ruby\lib\ruby\1.8\i386-mswin32\config.h(76) : warning
C4005:
‘inlin
e’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h
(46)
: Siehe vorherige Definition von ‘inline’
E:\Programme\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(
98) : warning C4005: ‘ERROR’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\except.h
(71):
Siehe vorherige Definition von ‘ERROR’
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c -
Tcbitvector.c
bitvector.c
e:\Programme\ruby\lib\ruby\1.8\i386-mswin32\config.h(76) : warning
C4005:
‘inlin
e’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h
(46)
: Siehe vorherige Definition von ‘inline’
E:\Programme\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(
98) : warning C4005: ‘ERROR’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\except.h
(71):
Siehe vorherige Definition von ‘ERROR’
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c
-Tccompound_io.c
compound_io.c
e:\Programme\ruby\lib\ruby\1.8\i386-mswin32\config.h(76) : warning
C4005:
‘inlin
e’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h
(46)
: Siehe vorherige Definition von ‘inline’
E:\Programme\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(
98) : warning C4005: ‘ERROR’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\except.h
(71):
Siehe vorherige Definition von ‘ERROR’
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c
-Tcdocument.c
document.c
e:\Programme\ruby\lib\ruby\1.8\i386-mswin32\config.h(76) : warning
C4005:
‘inlin
e’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h
(46)
: Siehe vorherige Definition von ‘inline’
E:\Programme\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(
98) : warning C4005: ‘ERROR’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\except.h
(71):
Siehe vorherige Definition von ‘ERROR’
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c
-Tcexcept.c
except.c
e:\Programme\ruby\lib\ruby\1.8\i386-mswin32\config.h(76) : warning
C4005:
‘inlin
e’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h
(46)
: Siehe vorherige Definition von ‘inline’
E:\Programme\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(
98) : warning C4005: ‘ERROR’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\except.h
(71):
Siehe vorherige Definition von ‘ERROR’
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c
-Tcferret.c
ferret.c
e:\Programme\ruby\lib\ruby\1.8\i386-mswin32\config.h(76) : warning
C4005:
‘inlin
e’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h
(46)
: Siehe vorherige Definition von ‘inline’
E:\Programme\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(
98) : warning C4005: ‘ERROR’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\except.h
(71):
Siehe vorherige Definition von ‘ERROR’
ferret.c(186) : error C2449: ‘{’ auf Dateiebene gefunden - fehlt der
Funktionsko
pf?
ferret.c(206) : error C2059: Syntaxfehler: ‘}’

nmake install
cl -nologo -MD -Zi -O2b2xg- -G6 -I.
-Ie:/programme/ruby/lib/ruby/1.8/i38
6-mswin32 -Ie:/programme/ruby/lib/ruby/1.8/i386-mswin32 -I. -c
-Tcferret.c
ferret.c
e:\Programme\ruby\lib\ruby\1.8\i386-mswin32\config.h(76) : warning
C4005:
‘inlin
e’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\defines.h
(46)
: Siehe vorherige Definition von ‘inline’
E:\Programme\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(
98) : warning C4005: ‘ERROR’: Makro-Neudefinition
e:\Programme\ruby\lib\ruby\gems\1.8\gems\ferret-0.10.0\ext\except.h
(71):
Siehe vorherige Definition von ‘ERROR’
ferret.c(186) : error C2449: ‘{’ auf Dateiebene gefunden - fehlt der
Funktionsko
pf?
ferret.c(206) : error C2059: Syntaxfehler: ‘}’

nmake clean
Successfully installed ferret-0.10.0
Installing ri documentation for ferret-0.10.0…
Installing RDoc documentation for ferret-0.10.0…

D:\Dokumente und Einstellungen\Administrator>

Hi Jan,

I’ll try and compile a Windows binary tomorrow. I haven’t tried
compiling any of the binding code on Windows yet so no doubt there
will be some problems. I’ll be using VC6 so it may still require some
work to get it working in VC7. But I’ll upload a win32 gem so this
shouldn’t be to much of a problem.

Cheers,
Dave

Three words: Great!!!

I have more or less the same result as Jan. I would really
appreciate a win32 gem too!

thanks a lot.

On 8/24/06, huli [email protected] wrote:

I have more or less the same result as Jan. I would really
appreciate a win32 gem too!

thanks a lot.

I finished 5 minutes before I had to leave for a flight home to
Sydney. I didn’t have time to upload a windows gem and I even forgot
to commit the work. It’s sitting on my PC back in Tokyo. I’ll be back
on the 1st so I’ll upload the win32 gem then.

Cheers,
Dave