Show Changes Show Changes
Edit Edit
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Topic Locks Topic Locks

Search

History

2/22/2017 3:50:50 AM
-92.222.238.172
11/10/2013 6:00:55 PM
-178.27.128.97
3/14/2012 11:06:34 AM
-180.194.245.247
1/23/2008 10:58:36 PM
-58.150.206.116
1/23/2008 10:58:26 PM
-58.150.206.116
List all versions List all versions

RSS feed for the SquirrelWiki namespace

Windows CE_ Pocket PC
.

liacacels

Summary

This is a short guide to build Squirrel 2.1 final for Windows CE/Pocket PC.

The tool used will be Embedded Visual C++ 4. Recently Microsoft decided to move mobile development on Visual Studio 2005 Professional, but Embedded 4 is still available, for free, and it is ok to develop for Pocket PC 2003 and Windows CE 4/5.

Usually I divide the project in 2 subprojects: squirrel (the core files) and sqstdlib (the standard library). Both projects are set to generate a static library (squirrelCE.lib and sqstdlibCe.lib)

First of all it is necessary to modify a bit some code in sqvm.cpp (the same twiks are necessary for Visual Studio 6).

At line 935 of sqvm.cpp there is this: (http://www.krebs-mann.com/)

case OPPOPTRAP:

                for(SQInteger i = 0; i< arg0;i++)
                     _etraps.pop_back(); traps--;
                    ci->_etraps--;
                }
 continue;

We need to change it in:

 case _OP_POPTRAP: {
                                for(SQInteger i = 0; i < arg0; i++) {
                                        _etraps.pop_back(); traps--;
                                        ci->_etraps--;
                                }
                }
 continue;

Actually we just surrounded the for cycle with a couple of {} brackets.

Then we need to build the sqstdlib.

It is a little bit more tricky, because of someissues with wchar_t and some functions missing from Windows CE.

When creating the project, just forget about sqstdsystem.cpp.

Then you have to change every other cpp file in the sqstdlib folder and make it include this file (copied from a file with the same name in the squirrel folder) instead of squirrel.h

sqpcheader.h

 /*        see copyright notice in squirrel.h */
 #ifndef _SQPCHEADER_H_
 #define _SQPCHEADER_H_


 #if defined(_MSC_VER) && defined(_DEBUG)
 #include <crtdbg.h>
 #endif 


 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
 #include <new>
 //squirrel stuff
 #include <squirrel.h>
 //#include "sqobject.h"
 //#include "sqstate.h"


 #endif //_SQPCHEADER_H_

I just commented out the last two "includes".

In this way I could compile Squirrel 2.1 (this tweaks were not necessary with old versions).

I still need to experiment a bit, but, if someone wants to help/test I'l be more than happy to share.

Not logged in. Log in

squirrel's community wiki

This is FlexWiki, an open source wiki engine.

Change Style

Recent Topics