# Build for Windows Mobile Failed

**URL:** <https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836>\
**Category:** Ruby\
**Created:** [March 14, 2006, 7:03pm UTC](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836 "2006-03-14T19:03:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_VSSSSlkerts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Post date:** [March 14, 2006, 7:03pm UTC](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836/1 "2006-03-14T19:03:35Z")

</div>

Dear Readers,

I searched the ruby-talk archives and googled but both left me alone.

After I read the README.wince documentation for the build process I  
installed all the required files. My setup is:

- Windows Embedded Visual C++ 4.0 SP4

- DELL Axim X51 ARMV5T XScale CPU

- Windows Mobile 5.0

The following batch set the env variables and provide me a command line  
for the build process.

–\>8—

set INCLUDE=F:\Programme\Windows CE  
Tools\wce400\STANDARDSDK\Include\Armv4t

set LIB=F:\Programme\Windows CE Tools\wce400\STANDARDSDK\Lib\Armv4t  
set CE\_TOOLS\_DIR=F:\Programme\Windows CE Tools\wce400  
set EMBEDDED\_TOOLS\_DIR=C:\Programme\Microsoft eMbedded C++  
4.0\EVC\WCE400\BIN

set  
PATH=%PATH%;%EMBEDDED\_TOOLS\_DIR%;%CE\_TOOLS\_DIR%;C:\Programme\Microsoft  
eMbedded C++ 4.0\Common\EVC\Bin

## start /D F:\ cmd.exe

I successfully ran configure.bat (without an architecture type as  
parameter for two reasons: first I don’t habe any idea how to look up  
the target string for my pda like ‘arm-hpc-wince’, second this parameter  
seems to be optional)

I ran nmake and he complaint following:

—\>8-------  
F:\ruby-1.8.4\wince\>configure.bat  
Creating Makefile  
type `NMAKE’ to make ruby for mswince.  
F:\ruby-1.8.4\wince\>nmake

Microsoft ® Program Maintenance Utility Version 6.00.8168.0  
Copyright © Microsoft Corp 1988-1998. All rights reserved.

## Creating fake.rb Creating config.h config.h updated. Creating config.status rbconfig.rb updated cl -nologo -Zi -w -O2b2xg- -G6 -DRUBY\_EXPORT -I. -I./… -I./…/missing -I./…/wince -I. -I./ … -I./…/missing -I./…/wince -DUNDER\_CE -D\_WIN32\_WCE= -DFILENAME\_MAX=MAX\_PATH -DTLS\_OUT\_OF\_INDE XES=0xFFFFFFFF -DBUFSIZ=512 -D\_UNICODE -DUNICODE -c -Tc./…/array.c array.c .\config.h(92) : fatal error C1017: invalid integer constant expression NMAKE : fatal error U1077: ‘cl’ : return code ‘0x2’ Stop.

It seems that he stops as the -D variable \_WIN32\_WCE= is empty. Okay.  
Opened the makefile in my editor and look up the line.

-----\>8-------  
PROCESSOR\_ARCHITECTURE = x86  
PROCESSOR\_LEVEL = 6

# RUBY\_SO\_NAME = $(RT)-$(RUBY\_INSTALL\_NAME)$(MAJOR)$(MINOR)

# CFLAGS = -nologo $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR\_FLAG)

## CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -I$(srcdir)/wince $(CECPUDEF) -DUNDER\_CE -D\_WIN32\_WCE=$(SUBSYSVERSION:.=) -DFILENAME\_MAX=MAX\_PATH -DTLS\_OUT\_OF\_INDEXES=0xFFFFFFFF -DBUFSIZ=512 -D\_UNICODE -DUNICODE $(QSH4)

How does he resolve the SUBSYSVERSION? It shouldn’t be empty (I guess).  
Sorry for the long post, but I hope to demonstrate that I try to figure  
out the problem.

TIA,

---

<div class="post-metadata">

**Author:** ![Daniel\_VSSSSlkerts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Post date:** [March 14, 2006, 10:16pm UTC](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836/2 "2006-03-14T22:16:13Z")

</div>

Daniel Völkerts wrote:

> I searched the ruby-talk archives and googled but both left me alone.
> 
> After I read the README.wince documentation for the build process I  
> installed all the required files.

Join the club. I have tried building a WinCE version against Ruby  
versions 1.6.8 through 1.8.4 with no luck. I wound up installing a  
binary version I found on this website →   
[ruby-mswince](http://uema2.s8.xrea.com/ruby-mswince/). It seemed to work up to a  
certain point but then the Ruby interpreter would error out trying to  
parse the scripts it was given as a command line argument.The string  
module must be incompatible between the Ruby binary version and my  
WinCE platform (in this case a Dell Axim x50 running Windows Mobile  
5.0). Since I had to port my client app to this platform I rewrote the  
whole thing in Python. Not fun but it was the best tool for the job.

---

<div class="post-metadata">

**Author:** ![Daniel\_VSSSSlkerts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Post date:** [March 15, 2006, 4:20am UTC](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836/3 "2006-03-15T04:20:43Z")

</div>

Daniel Völkerts wrote:

> Thanks. I googled your tries. It is a bit frustrating as this option is  
> provided by the sources, so my guess was that anybody is mainting this.  
> So I thought their might be someone who knows what is going on. It’s a  
> pitty that ruby loses ground on that sector ☹
> 
> I’ll try one and report a success.

As for the sources, from what I’ve read there was a version of Ruby  
called PocketRuby that was compiled for Windows CE devices. But this  
version hasn’t been officially supported for awhile AFAIK, although the  
wince build directory is still there. The only guess I have is that the  
MSVC build process fails but perhaps the Cygwin route might produce  
better results. I frankly didn’t have the time to try every option and  
combination of compilers and gave up. Hopefully you have better luck.  
Please provide an update if anything comes about…

---

<div class="post-metadata">

**Author:** ![Daniel\_VSSSSlkerts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Post date:** [March 15, 2006, 12:06am UTC](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836/4 "2006-03-15T00:06:52Z")

</div>

gregarican schrieb:

> Join the club. I have tried building a WinCE version against Ruby  
> versions 1.6.8 through 1.8.4 with no luck. I wound up installing a  
> binary version I found on this website →   
> [ruby-mswince](http://uema2.s8.xrea.com/ruby-mswince/). It seemed to work up to a  
> certain point but then the Ruby interpreter would error out trying to  
> parse the scripts it was given as a command line argument.The string  
> module must be incompatible between the Ruby binary version and my  
> WinCE platform (in this case a Dell Axim x50 running Windows Mobile  
> 5.0). Since I had to port my client app to this platform I rewrote the  
> whole thing in Python. Not fun but it was the best tool for the job.

Thanks. I googled your tries. It is a bit frustrating as this option is  
provided by the sources, so my guess was that anybody is mainting this.  
So I thought their might be someone who knows what is going on. It’s a  
pitty that ruby loses ground on that sector ☹

I’ll try one and report a success.

TIA,

---

<div class="post-metadata">

**Author:** ![Daniel\_VSSSSlkerts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Post date:** [March 15, 2006, 9:05am UTC](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836/5 "2006-03-15T09:05:22Z")

</div>

gregarican schrieb:

> As for the sources, from what I’ve read there was a version of Ruby  
> called PocketRuby that was compiled for Windows CE devices. But this  
> version hasn’t been officially supported for awhile AFAIK, although the  
> wince build directory is still there. The only guess I have is that the  
> MSVC build process fails but perhaps the Cygwin route might produce  
> better results. I frankly didn’t have the time to try every option and  
> combination of compilers and gave up. Hopefully you have better luck.  
> Please provide an update if anything comes about…

First I’ll give the CVS version a try. If this fails I use the cygwin /  
linux build environment. I read about Mozilla Minimo to use Linux as a  
build environment for Pocket PC. So there is more experience on this I  
hope.

Greetings,

---

<div class="post-metadata">

**Author:** ![Daniel\_VSSSSlkerts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Post date:** [March 15, 2006, 9:17am UTC](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836/6 "2006-03-15T09:17:30Z")

</div>

Oh it is going on. By your hint, I searched for PocketRuby and patch and  
found an thread on ruby-dev. Great I thought. Unfortunatly the thread is  
in japanese?

I can spanish, french, english, german and Java™ _g_. A automatic  
translation failed. Any help is appreciated.

g,

---

<div class="post-metadata">

**Author:** ![Daniel\_VSSSSlkerts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d26b3c/32.png) [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Post date:** [March 15, 2006, 2:56pm UTC](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836/7 "2006-03-15T14:56:40Z")

</div>

Daniel Völkerts wrote:

> Oh it is going on. By your hint, I searched for PocketRuby and patch and  
> found an thread on ruby-dev. Great I thought. Unfortunatly the thread is  
> in japanese?
> 
> I can spanish, french, english, german and Java™ _g_. A automatic  
> translation failed. Any help is appreciated.

I would try Babelfish, although the translations that I try for  
Japanese-\>English tend to make things sound a little silly. But at  
least it gives me some hints as to what is going on. Frankly this is  
still the one aspect of Ruby that leaves it lacking for me as a  
production solution for some areas in my company. After over a year of  
trying I have still found it isn’t totally friendly toward Win32/MSVC  
and seems biased toward Linux/GCC. And trying to rig my own solution is  
tough because key documentation can be Japanese only in certain  
situations I have run into (e.g. - PocketRuby, DL).

I love Ruby’s syntax, intuitiveness, mindset, and elegance. It makes  
sense to me more  
than any other language. And perhaps that’s what frustrates me the  
most, since I have to resort to other (less preferred) languages for  
certain tasks. I’d rather be doing it in Ruby. Not to troll, but if  
Python is a more prominent language compared to Ruby I would bet in  
part it’s because it’s more Windows-friendly. Sure it’s been around  
longer and had more libraries and extensions built for it. But if  
Windows clients make up the vast majority of OS market share it’s  
certainly easier to deploy solutions that don’t involve digging deep  
under the hood to compile things 🙂
