Harbour and Windows CE for beginers

265 views
Skip to first unread message

CarozoDeQuilmes

unread,
Apr 16, 2011, 5:24:46 PM4/16/11
to harbou...@googlegroups.com
Hi, I'm trying to begin working with Windows CE and Harbour.

I've read a lot of pages about it but I don't understand what tools need to achieve it.

I have a clean intel PC for developing and I can get a little ARM device to test .

Can anybody build a simple "step by step" instruction to compile and run a "Hello World" program in WinCE?

Thank in advance
--
CdQ

Viktor Szakáts

unread,
Apr 16, 2011, 5:39:37 PM4/16/11
to harbou...@googlegroups.com

All information is in these files:
package/winuni/HARBOUR_README_MINGWARM
package/winuni/RELNOTES
INSTALL

Viktor

Bruno Luciani

unread,
Apr 16, 2011, 6:22:35 PM4/16/11
to harbou...@googlegroups.com
Viktor , I read this files

But is not clear to me where to put in linux,  CE Gcc files

Any Idea ?

Bruno

Viktor Szakáts

unread,
Apr 16, 2011, 6:28:49 PM4/16/11
to harbou...@googlegroups.com
On Sun, Apr 17, 2011 at 12:22 AM, Bruno Luciani <bruno....@gmail.com> wrote:
> Viktor , I read this files
>
> But is not clear to me where to put in linux,  CE Gcc files

Oh, for Linux. I'm not sure I ever tried that case.

> Any Idea ?

Check autodetection locations in config/global.mk

Viktor

Bruno Luciani

unread,
Apr 16, 2011, 6:41:15 PM4/16/11
to harbou...@googlegroups.com
Thanks

2011/4/16 Viktor Szakáts <harbo...@syenar.hu>

Bruno Luciani

unread,
Apr 16, 2011, 6:47:19 PM4/16/11
to harbou...@googlegroups.com
Acabo de intentar compilar para wince

pero parece que para un programa consola exige tener la lib wvt  proba en windows
no creo que se complique

Burno

2011/4/16 CarozoDeQuilmes <carozod...@gmail.com>

Bruno Luciani

unread,
Apr 16, 2011, 6:47:58 PM4/16/11
to harbou...@googlegroups.com
Sorry my mistake

2011/4/16 Bruno Luciani <bruno....@gmail.com>

francesco perillo

unread,
Apr 16, 2011, 7:04:22 PM4/16/11
to harbou...@googlegroups.com
Bruno, I believe you should create a cross-compiler/tool-chain, put it
where you want... you should have a look at cross-compiling
instruction...

francesco perillo

unread,
Apr 16, 2011, 7:04:44 PM4/16/11
to harbou...@googlegroups.com
and, by the way, if you are succesfull, please report here :-)

Bruno Luciani

unread,
Apr 16, 2011, 7:12:33 PM4/16/11
to harbou...@googlegroups.com
he he , is not easy

Ok

2011/4/16 francesco perillo <fper...@gmail.com>

Massimo Belgrano

unread,
Apr 17, 2011, 6:48:41 AM4/17/11
to harbou...@googlegroups.com
+1 for not easy
I have also tried unsuccessfully
so i hope in steep by steep guide

2011/4/17 Bruno Luciani <bruno....@gmail.com>



--
Massimo Belgrano

Viktor Szakáts

unread,
Apr 17, 2011, 8:37:48 AM4/17/11
to harbou...@googlegroups.com
On Sun, Apr 17, 2011 at 12:48 PM, Massimo Belgrano <mbel...@deltain.it> wrote:
> +1 for not easy
> I have also tried unsuccessfully
> so i hope in steep by steep guide

It's already done for Windows. Read it
and report what's unclear.

Viktor

Massimo Belgrano

unread,
Apr 17, 2011, 9:31:01 AM4/17/11
to harbou...@googlegroups.com
I wait same result  from samebody here that can help also me

2011/4/17 Viktor Szakáts <harbo...@syenar.hu>



--
Massimo Belgrano


Viktor Szakáts

unread,
Apr 17, 2011, 9:41:22 AM4/17/11
to harbou...@googlegroups.com
On Sun, Apr 17, 2011 at 3:31 PM, Massimo Belgrano <mbel...@deltain.it> wrote:
> I wait same result  from samebody here that can help also me

If everyone wait for someone else's result, we will get nowhere.

Is there an epidemic here? Everyone keep asking questions
and ignoring help, or unwilling to do any homework or even giving
any feedback.

Let me note that's not how free software work.

Or maybe this just falls into the case when someone doing
an effort which no one needs or appreciates, so the effort is
useless.

Viktor

Bruno Luciani

unread,
Apr 17, 2011, 11:42:19 AM4/17/11
to harbou...@googlegroups.com
If this directory is empty, download package from link below
and unpack into this directory.

http://sourceforge.net/projects/cegcc/files/

NOTES: - In order to unpack and *use* this package, you'll
         need Cygwin package (from http://cygwin.com) installed
         and put in PATH for Cygwin runtime (cygwin1.dll).
       - Unpack using these commands:
            > bzip2 -d cegcc_mingw32ce_cygwin1.7_r1375.tar.bz2
            > tar -xvf cegcc_mingw32ce_cygwin1.7_r1375.tar -h
            OR
            > tar --force-local -xvf cegcc_mingw32ce_cygwin1.7_r1375.tar
       - Move content of /opt/mingw32ce directory to this one.


In windows This is what I done

Install Cygwin in C:\Cygwin

Download cegcc files

But in DOC says to - Move content of /opt/mingw32ce directory to this one.

But /opt  not exist in package or in cygwin instalation

Is not clear where to put cegcc file , in harbour install or in cygwin install ?

Bruno


2011/4/17 Viktor Szakáts <harbo...@syenar.hu>

Viktor Szakáts

unread,
Apr 17, 2011, 11:58:51 AM4/17/11
to harbou...@googlegroups.com
On Sun, Apr 17, 2011 at 5:42 PM, Bruno Luciani <bruno....@gmail.com> wrote:
> If this directory is empty, download package from link below
> and unpack into this directory.
>
> http://sourceforge.net/projects/cegcc/files/
>
> NOTES: - In order to unpack and *use* this package, you'll
>          need Cygwin package (from http://cygwin.com) installed
>          and put in PATH for Cygwin runtime (cygwin1.dll).
>        - Unpack using these commands:
>             > bzip2 -d cegcc_mingw32ce_cygwin1.7_r1375.tar.bz2
>             > tar -xvf cegcc_mingw32ce_cygwin1.7_r1375.tar -h
>             OR
>             > tar --force-local -xvf cegcc_mingw32ce_cygwin1.7_r1375.tar
>        - Move content of /opt/mingw32ce directory to this one.
>
>
> In windows This is what I done
>
> Install Cygwin in C:\Cygwin
>
> Download cegcc files
>
> But in DOC says to - Move content of /opt/mingw32ce directory to this one.
>
> But /opt  not exist in package or in cygwin instalation

Well, this file is installed into <harbour_root>/comp/mingwarm/
in binary installations, and it's meant to guide those users, so
if you translate it into this context, /opt should go to f.e.
C:\hb20\comp\mingwarm\opt\mingw32ce
In such way it will be automatically used by hbmk2 shipped with
Harbour binary distro.

If you want to use it to build Harbour itself, just unpack it
to _anywhere_, and it to PATH. Nothing special.

Viktor

Bruno Luciani

unread,
Apr 17, 2011, 2:15:29 PM4/17/11
to harbou...@googlegroups.com
I do that an get the same error trying to compile

C:\harbour>hbmk2 test.prg -platform=wce
hbmk2: Processing environment options: -compiler=mingw
hbmk2: Error: Compiler value unknown: mingw

C:\harbour>hbmk2 test.prg -platform=wce -compiler=mingwce
hbmk2: Processing environment options: -compiler=mingw
hbmk2: Error: Compiler value unknown: mingwce
enviroment

c:\harbour
c:\harbour\comp\mingwarm\opt\ming32ce
c:\cygwin

The only diference is that i am using compiled here harbour
may be I need to recompile with some variable set to harbour
recognize mingwarm ?

Bruno

Viktor Szakáts

unread,
Apr 17, 2011, 2:48:45 PM4/17/11
to harbou...@googlegroups.com
On Sun, Apr 17, 2011 at 8:15 PM, Bruno Luciani <bruno....@gmail.com> wrote:
> I do that an get the same error trying to compile
>
> C:\harbour>hbmk2 test.prg -platform=wce
> hbmk2: Processing environment options: -compiler=mingw
> hbmk2: Error: Compiler value unknown: mingw

You force compiler value using an environment variable. Delete it.

> C:\harbour>hbmk2 test.prg -platform=wce -compiler=mingwce
> hbmk2: Processing environment options: -compiler=mingw
> hbmk2: Error: Compiler value unknown: mingwce
> enviroment

The name of mingw compiler for wce is mingwarm. Pls
use INSTALL doc.

Viktor

Bruno Luciani

unread,
Apr 17, 2011, 4:17:50 PM4/17/11
to harbou...@googlegroups.com
Ok you are wright

Now I am trying to create wce harbour binary

why I get this error ?

________________________________________________

Microsoft Windows XP [Versión 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\harbour_svn>win-make clean install
! Building Harbour 2.1.0rc2 from source - http://harbour-project.org
! MAKE: win-make 3.82 C:/cygwin/bin/sh.exe clean install
! HB_INSTALL_PREFIX: c:\harbourwce
! HB_HOST_PLAT: win (x86)  HB_SHELL: nt
! HB_PLATFORM: wce  (x86)
! HB_COMPILER: mingwarm
! HB_HOST_BIN: c:\harbour\bin
! Component: 'zlib' found in C:/harbour_svn/src/3rd/zlib (local)
! Component: 'pcre' found in C:/harbour_svn/src/3rd/pcre (local)
! Component: 'gpm' not supported on wce  platform
! Component: 'slang' not found. Configure with HB_WITH_SLANG.
! Component: 'curses' not found. Configure with HB_WITH_CURSES.
! Component: 'x11' not found. Configure with HB_WITH_X11.
! Component: 'wattcp/watt-32' not supported on wce  platform
config/global.mk:1832: config/wce: Permission denied
config/global.mk:1832: /global.mk: No such file or directory
win-make: *** No rule to make target `/global.mk'.  Stop.


2011/4/17 Viktor Szakáts <harbo...@syenar.hu>

CarozoDeQuilmes

unread,
Apr 17, 2011, 4:48:46 PM4/17/11
to harbou...@googlegroups.com
Hi Viktor, many thanks.

Sharing my experience:

After read Victor's recomended files, I did the following steps:

1.- Install Virtual Box under Windows XP

2.- Make a new virtual machine with Windows XP SP3 (to easy move it to another Host)

Now in Virtual Machine:

3.- Install SVN (Tortoise)

4.- Download Harbour SVN to c:\factory_sources\harbourMinGW

5.- Download MinGW and install it in c:\factory\mingw

6.- Download Make 3.81 and install it in c:\factory_sources\mingw32-make

7.- Make Harbour with the followin bat from c:\factory_sources

@echo off
rem ============================================================================
echo BATCH FILE FOR Harbour MinGW
rem ============================================================================
SET FGS_DISC=C:
SET FGS_CC_DIR=%FGS_DISC%\factory\mingw
SET FGS_MAKE_DIR=%FGS_DISC%\factory_sources\mingw32-make
SET _PATH=%PATH%
SET PATH=%FGS_MAKE_DIR%;%FGS_CC_DIR%\BIN;%PATH%
SET HB_INSTALL_PREFIX=%FGS_DISC%\factory\harbour
rem SET HB_WITH_QT=%FGS_DISC%\qt\5.2\include
rem SET HB_QTPATH=%FGS_DISC%\qt\4.5.2\bin
rem SET HB_QT_BUILD_STATIC=yes
cd HarbourMinGW
if "%1"=="CLEAN" goto clean
if "%1"=="clean" goto clean
call mingw32-make install
goto path
:clean
call mingw32-make clean
:path
SET PATH=%_PATH%
cd..
pause

-----------------------------

BATCH FILE FOR Harbour MinGW

! Building Harbour 2.1.0rc2 from source - http://harbour-project.org
! MAKE: mingw32-make 3.81 sh.exe install
! HB_INSTALL_PREFIX: C:\factory\harbour

! HB_HOST_PLAT: win (x86)  HB_SHELL: nt
! HB_PLATFORM: win (x86) (autodetected)
! HB_COMPILER: mingw (v44) (autodetected: C:/factory/mingw/BIN/)
...

-----------------------------
8.- test it making hello.prg by running:

hbmk2 ..\..\tests\hello

from c:\factory_sources\harbourMinGW\bin\win\mingw

9.- Download Harbour again, but to c:\factory_sources\harbourMinGW32ce

10.- Donwload and install cygwin in c:\factory\cygwin

11.- Download mingw32ce and unzip it in c:\factory\mingw32ce

12.- Make Harbour for Win CE with the following bat from c:\factory_sources

@echo off
rem ============================================================================
echo BATCH FILE FOR Harbour MinGW CE ARM
rem ============================================================================
SET FGS_DISC=C:
SET FGS_CC_DIR=%FGS_DISC%\factory\mingw32ce\bin
SET FGS_MAKE_DIR=%FGS_DISC%\factory_sources\mingw32-make
SET FGS_CYGWIN_DIR=%FGS_DISC%\factory\cygwin\bin
SET _PATH=%PATH%
SET PATH=%FGS_MAKE_DIR%;%FGS_CC_DIR%;%FGS_CYGWIN_DIR%;%PATH%
SET CYGWIN=nodosfilewarning
SET HB_HOST_BIN=%FGS_DISC%\factory_sources\harbourmingw\bin\win\mingw
rem Viktor recomended not use it SET HB_PLATFORM=wce
rem Viktor recomended not use it SET HB_COMPILER=mingwarm
SET HB_INSTALL_PREFIX=%FGS_DISC%\factory\harbour32ce
rem SET HB_WITH_QT=%FGS_DISC%\factory_sources\qt_4_7_2_WinCE\include
rem SET HB_QTPATH=%FGS_DISC%\factory_sources\qt_4_7_2_WinCE\bin
rem SET HB_QT_BUILD_STATIC=yes
cd HarbourMinGW32ce
if "%1"=="CLEAN" goto clean
if "%1"=="clean" goto clean
call mingw32-make install
goto path
:clean
call mingw32-make clean
:path
SET PATH=%_PATH%
cd..
pause

--------------------------------

BATCH FILE FOR Harbour MinGW CE ARM

! Building Harbour 2.1.0rc2 from source - http://harbour-project.org
! MAKE: mingw32-make 3.81 C:/factory/cygwin/bin/sh.exe install
! HB_INSTALL_PREFIX: C:\factory\harbour32ce

! HB_HOST_PLAT: win (x86)  HB_SHELL: nt
! HB_PLATFORM: wce (arm) (autodetected)
! HB_COMPILER: mingwarm (autodetected: C:/factory/mingw32ce/bin/)
! HB_HOST_BIN: C:\factory_sources\harbourmingw\bin\win\mingw

....

--------------------------------
This process cancel with an error:

error while loading shared libraries: cygmpfr-1.dll: cannot open shared object file: No such file or directory

I resolve it by installing g++ support from cygwin setup

Then, I restarted the process and it finished (with an error in lib lzf) but finished !!!!

...
...
C:\factory_sources\harbourmingw\bin\win\mingw\hbmk2 -quiet -width=0 @hbpre -inc
hblzf/3rd/liblzf/lzf.hbp @hbpost
In file included from ../../../../../contrib/hblzf/3rd/liblzf/lzf_d.c:42:
/cygdrive/c/factory/mingw32ce/bin/../lib/gcc/arm-mingw32ce/4.4.0/../../../../arm
-mingw32ce/include/errno.h:12:25: error: no include path in which to search for errno.h
../../../../../contrib/hblzf/3rd/liblzf/lzf_d.c: In function 'lzf_decompress':
../../../../../contrib/hblzf/3rd/liblzf/lzf_d.c:74: error: 'errno' undeclared (first use in this function)
../../../../../contrib/hblzf/3rd/liblzf/lzf_d.c:74: error: (Each undeclared identifier is reported only once
../../../../../contrib/hblzf/3rd/liblzf/lzf_d.c:74: error: for each function it appears in.)
../../../../../contrib/hblzf/3rd/liblzf/lzf_d.c:74: error: 'E2BIG' undeclared (first use in this function)
../../../../../contrib/hblzf/3rd/liblzf/lzf_d.c:81: error: 'EINVAL' undeclared (first use in this function)
hbmk2: Error: Running C/C++ compiler. 1
! 'hblzf/3rd/liblzf/lzf.hbp' returned status: 6
! Finished package build and install...
mingw32-make[1]: [install] Error 6 (ignored)
C:\factory_sources\harbourmingw\bin\win\mingw/hbmk2.exe ./config/postinst.hbs install
! Copying root documents...
! Copying Harbour script (.hbs) files...
! Making core translation (.hbl) files...
! Created C:\factory\harbour32ce\bin\hbmk2.es_PE.hbl <= utils\hbmk2\hbmk2.es_PE.po
! Created C:\factory\harbour32ce\bin\hbmk2.hu_HU.hbl <= utils\hbmk2\hbmk2.hu_HU.po
! Created C:\factory\harbour32ce\bin\hbmk2.pt_BR.hbl <= utils\hbmk2\hbmk2.pt_BR.po
! Compiling core documentation (.hbd)...
! Created C:\factory\harbour32ce\doc\harbour.hbd <= .\
! postinst.hbs finished
Press any key to continue . . .

Obviously, I can't test it until I get an ARM device.

Questions:

a.- Can I test my hello program for win ce in my Windows XP Host?

c.- Is posible add support to Qt in cross build?

d.- Is posible to make Harbour for WinCE directly in WinCE?

Thanks in advance

CdQ



--
CdQ

Viktor Szakáts

unread,
Apr 17, 2011, 4:50:45 PM4/17/11
to harbou...@googlegroups.com

Seems like incomplete/corrupt source tree.

Viktor

Viktor Szakáts

unread,
Apr 17, 2011, 5:53:08 PM4/17/11
to harbou...@googlegroups.com
Hi,

You can use win-make.exe for simplicity.

Yes, cygwin can be a bitch to install, this step seems
familiar (though it was out of scope for my documents).

> Then, I restarted the process and it finished (with an error in lib lzf) but
> finished !!!!

Good!

Looks good. The lzf problem... I remember having it
fix once already, seems it was not enough.

I'd be grateful if Petr could fix this, it was listed as
TOFIX since the first commit.

> Obviously, I can't test it until I get an ARM device.
>
> Questions:
>
> a.- Can I test my hello program for win ce in my Windows XP Host?

With a WinCE emulator. I don't know the details though.

> c.- Is posible add support to Qt in cross build?

Depends on QT, Harbour has no problem with it.

> d.- Is posible to make Harbour for WinCE directly in WinCE?

No, it's a target only platform.

Viktor

Massimo Belgrano

unread,
Apr 17, 2011, 5:58:08 PM4/17/11
to harbou...@googlegroups.com

CarozoDeQuilmes

unread,
Apr 18, 2011, 9:20:47 PM4/18/11
to harbou...@googlegroups.com
Ok, very thanks !


> a.- Can I test my hello program for win ce in my Windows XP Host?
With a WinCE emulator. I don't know the details though.


Ok!, I'm trying to make my hello.exe under Windows XP with cross compiler to platform wce.
I've the following tree folder:

\Harbour
   |
   +bin
      |
      +wce
      |  |
      |  +mingw
      |
      +win
         |
         +mingw
    
then, from win\mingw, I used the following bat:

set path=c:\factory\mingw32ce\bin;%PATH%
hbmk2 ..\..\..\tests\hello.prg -platform=wce -compiler=mingwarm

---


Harbour 2.1.0rc2 (Rev. 16606)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling '..\..\..\tests\hello.prg'...
Lines 11, Functions/Procedures 1
Generating C source output to 'C:\Windows\Temp\hbmk_ozdunm.dir\hello.c'... Done.
hbmk2: Error: Running C/C++ compiler. -1
gcc.exe -c -O3 -fomit-frame-pointer  -W -Wall -pipe -DUNICODE -DUNDER_CE -IC:/factory_sources/HarbourMinGW32ce/include C:/Windows/Temp/hbmk_ozdunm.dir/hello.c C:/Windows/Temp/hbmk_hmsfw2.c

I think that problem is that gcc for wce don't run under winxp, then, I need use mingw for windows (not wce):

set path=c:\factory\mingw\bin;%PATH%
hbmk2 ..\..\..\tests\hello.prg -platform=wce -compiler=mingwarm

---

Harbour 2.1.0rc2 (Rev. 16606)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling '..\..\..\tests\hello.prg'...
Lines 11, Functions/Procedures 1
Generating C source output to 'C:\Windows\Temp\hbmk_nkd42t.dir\hello.c'... Done.
c:/factory/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot find -lcoredll
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe C:/Windows/Temp/hbmk_nkd42t.dir/hello.o C:/Windows/Temp/hbmk_nkd42t.dir/
hbmk_abw97l.o    -Wl,--start-group -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lcoredll -lws2 -lceshell -luuid -lole32 -loleaut32 -lwininet -lcommdlg -lcommctrl -lhbpcre -lhbzlib  -Wl,--end-group -ohello.exe
-LC:/factory_sources/HarbourMinGW32ce/lib/wce/mingwarm -LC:/factory_sources/HarbourMinGW32ce/bin/wce/mingwarm

coredll is a kernel library from wce...... then... I think that the only way to make hello.exe for wce is under wce.  Is it true or I'm wrong?

Thanks in advance
CdQ
--
CdQ

Viktor Szakáts

unread,
Apr 19, 2011, 5:15:39 AM4/19/11
to harbou...@googlegroups.com

No. You cannot use mingw for Windows to build wce apps.

Wrong.

Basic steps if you want to build the whole Harbour yourself:
1) Install cegcc (*aka 'mingwarm' or 'mingw for wince')
2) Install mingw
3) Setup PATH for mingw
4) Build Harbour for win/mingw (run 'win-make' from source root)
5) Setup PATH for cegcc
6) Build Harbour for wce/mingwarm (run 'win-make' from source root)
7) Run <harbour>/bin/win/mingw/hbmk2 <my.prg>

Basic steps if you want to use 2.0 win binary distro:
1) Install cegcc in <harbour>/comp/mingwarm/
(as described in HARBOUR_README_MINGWARM in that very dir)
2) Run <harbour>/bin/hbmk2 -platform=wce <my.prg>

Viktor

francesco perillo

unread,
Apr 19, 2011, 7:16:11 AM4/19/11
to harbou...@googlegroups.com
Viktor, please have a look at this file: config/wce/mingw.mk
It includes itself.... it should include mingwarm.mk (and now make
is running....)


I'm building a harbour cross-compiler, host is linux, target is wce.

francesco perillo

unread,
Apr 19, 2011, 7:44:33 AM4/19/11
to harbou...@googlegroups.com
Ok, compiled


pisolo:/usr/local/src/harbour-project/harbour # ll bin/wce/mingw/
total 5924
-rw-r--r-- 1 root root 104050 Apr 19 13:24 harbour-21-wce-x86.def
-rwxr-xr-x 1 root root 2956098 Apr 19 13:24 harbour-21-wce-x86.dll
-rwxr-xr-x 1 root root 624660 Apr 19 13:19 harbour.exe
-rwxr-xr-x 1 root root 32722 Apr 19 13:24 hbi18n.exe
-rwxr-xr-x 1 root root 1770688 Apr 19 13:24 hbmk2.exe
-rwxr-xr-x 1 root root 143242 Apr 19 13:19 hbpp.exe
-rwxr-xr-x 1 root root 424332 Apr 19 13:24 hbtest.exe
pisolo:/usr/local/src/harbour-project/harbour # file bin/wce/mingw/hbpp.exe
bin/wce/mingw/hbpp.exe: PE32 executable for MS Windows (console) Intel
80386 32-bit


hbmk2 -platform=wce -trace -debug hello.prg
hbmk2: Processing environment options: -platform=wce
hbmk2: Processing local make script: hbmk.hbm
hbmk2: Harbour compiler command (embedded):
(/usr/local/src/harbour-project/harbour/bin/linux/gcc/harbour.exe) -n2
hello.prg -w3 -o/tmp/hbmk_tqcxuu.dir/
-i/usr/local/src/harbour-project/harbour/include -undef:.ARCH.
-D__PLATFORM__WINDOWS -D__PLATFORM__WINCE -D__LITTLE_ENDIAN__
-D__ARCH32BIT__
Harbour 2.1.0rc2 (Rev. -1)


Copyright (c) 1999-2011, http://harbour-project.org/

Compiling 'hello.prg'...
Lines 11, Functions/Procedures 1
Generating C source output to '/tmp/hbmk_tqcxuu.dir/hello.c'... Done.
hbmk2: C/C++ compiler command:
/opt/x86mingw32ce/bin/i386-mingw32ce-gcc -c -O3 -march=i586
-mtune=pentiumpro -g -W -Wall -pipe -DUNICODE -DUNDER_CE
-I/usr/local/src/harbour-project/harbour/include
/tmp/hbmk_tqcxuu.dir/hello.c /tmp/hbmk_9cna5h.c
hbmk2: Linker command:
/opt/x86mingw32ce/bin/i386-mingw32ce-gcc /tmp/hbmk_tqcxuu.dir/hello.o
/tmp/hbmk_tqcxuu.dir/hbmk_9cna5h.o -Wl,--start-group -lhbextern


-lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd
-lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx
-lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp
-lhbcommon -lhbmainwin -lcoredll -lws2 -lceshell -luuid -lole32
-loleaut32 -lwininet -lcommdlg -lcommctrl -lhbpcre -lhbzlib
-Wl,--end-group -ohello.exe

-L/usr/local/src/harbour-project/harbour/lib/wce/mingw
-L/usr/local/src/harbour-project/harbour/bin/wce/mingw


pisolo:/usr/local/src/harbour-project/harbour/tests # file hello.exe
hello.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit

Now I should move it to the mobile.... :-)

Viktor Szakáts

unread,
Apr 19, 2011, 7:47:33 AM4/19/11
to harbou...@googlegroups.com
Hi Francesco,

Thanks for noticing, I'll correct it, though it should be
told, that nobody should use this target. Maybe on Linux
there exist mingw compiler for Intel based x86 devices,
but it's surely a very niche area.

Maybe I will rather delete it, because it seems to confuse
users to a great deal.

Viktor

Viktor Szakáts

unread,
Apr 19, 2011, 7:51:51 AM4/19/11
to harbou...@googlegroups.com

Only if you have an Intel x86 WinCE device,
which is not very widespread, to say the least.

Viktor

francesco perillo

unread,
Apr 19, 2011, 7:54:57 AM4/19/11
to harbou...@googlegroups.com
> Only if you have an Intel x86 WinCE device,
> which is not very widespread, to say the least.


Oh yes, I did the wrong target !!!!

francesco perillo

unread,
Apr 19, 2011, 10:14:54 AM4/19/11
to harbou...@googlegroups.com
I took another compiler present in the cegcc sourceforge project,
mingw32ce-0.59.1.tar.bz2

It should be ok:
pisolo:/opt/mingw32ce/bin # ./arm-mingw32ce-gcc -v
Using built-in specs.
Target: arm-mingw32ce

pisolo:/usr/local/src/harbour-project/harbour/tests # file hello*
hello.exe: PE32 executable for MS Windows 32-bit
hello.prg: ASCII C++ program text


Is it ok ???

CarozoDeQuilmes

unread,
Apr 20, 2011, 8:32:20 AM4/20/11
to harbou...@googlegroups.com
Hi Viktor, this "step by step" was very useful and now, I can compile the hello sample without errors.

From the same folder /harbour/bin/win/mingw I can compile to win and wce platforms.

I will share my tests for other people:

I'm using these .bat to test:

For win:

del helloWIN.exe
SET path=c:\factory\mingw\bin;%PATH%
hbmk2 ..\..\..\tests\hello.prg -ohelloWIN
helloWIN
pause

and the result is:

C:\factory_sources\HarbourMinGW\bin\win\mingw>del helloWIN.exe
C:\factory_sources\HarbourMinGW\bin\win\mingw>SET path=c:\factory\mingw\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Archivos de programa\TortoiseSVN\bin;c:\fgs\raiz_c
C:\factory_sources\HarbourMinGW\bin\win\mingw>hbmk2 ..\..\..\tests\hello.prg -oh
elloWIN

Harbour 2.1.0rc2 (Rev. 16606)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling '..\..\..\tests\hello.prg'...
Lines 11, Functions/Procedures 1
Generating C source output to 'C:\Windows\Temp\hbmk_p9cnmi.dir\hello.c'... Done.

C:\factory_sources\HarbourMinGW\bin\win\mingw>helloWIN

Hello world!
C:\factory_sources\HarbourMinGW\bin\win\mingw>pause
Presione una tecla para continuar . . .

for wce:

del helloWCE.exe
SET path=c:\factory\mingw32ce\bin;c:\factory\cygwin\bin;%PATH%
SET CYGWIN=nodosfilewarning
hbmk2 ..\..\..\tests\hello.prg -platform=wce -ohelloWCE
helloWCE
pause

Result:

C:\factory_sources\HarbourMinGW\bin\win\mingw>del helloWCE.exe
C:\factory_sources\HarbourMinGW\bin\win\mingw>SET path=c:\factory\mingw32ce\bin;c:\factory\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Archivos de programa\TortoiseSVN\bin;c:\fgs\raiz_c
C:\factory_sources\HarbourMinGW\bin\win\mingw>SET CYGWIN=nodosfilewarning
C:\factory_sources\HarbourMinGW\bin\win\mingw>hbmk2 ..\..\..\tests\hello.prg -platform=wce -ohelloWCE

Harbour 2.1.0rc2 (Rev. 16606)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling '..\..\..\tests\hello.prg'...
Lines 11, Functions/Procedures 1
Generating C source output to 'C:\Windows\Temp\hbmk_y47k3x.dir\hello.c'... Done.

C:\factory_sources\HarbourMinGW\bin\win\mingw>helloWCE

Obviously that run helloWCE.exe cancel with: Hello.exe is not a valid Win32 application.  
because it is running in win

Very good !

Many thanks
CdQ



--
CdQ

francesco perillo

unread,
Apr 20, 2011, 9:01:16 AM4/20/11
to harbou...@googlegroups.com
Hi,
I was able today to also cross-build harbour for windows ce, on linux
host. The only setup I did to compile harbour was to set
export HB_PLATFORM=wce

... I don't know if it is a deprecated way or not... the toolchain was
obviously in the expected directory /opt/xxxx

To compile programs I used
hbmk2 -platform=wce wcecon.prg

then I tested the tests/wcecon.prg and it works... but... how can I
exit from browse() ???? I don't have the ESC key... can I simulate it
???

CarozoDeQuilmes

unread,
Apr 20, 2011, 2:47:28 PM4/20/11
to harbou...@googlegroups.com
Hi Franceso, where are you testing? (emulator, real device, etc)

Thanks in advance
CdQ
--
CdQ

francesco perillo

unread,
Apr 20, 2011, 4:54:47 PM4/20/11
to harbou...@googlegroups.com
real device, htc tytan II

Jaroslaw Kadziola

unread,
Apr 21, 2011, 1:18:30 AM4/21/11
to francesco perillo
Hi Francesco ,

fp> real device, htc tytan II

From what i know, in this model of HTC is installed WM6 .
Can you take a look at this thread ?

"WIndows Mobile - the same problems Fri, 17 Dec 2010 14:00:58 +0100"

Could you compile the code below and let us know the results?
(code by Przemek)

------------------------------------------------------
proc main()
local i, h, n1, n2
? "test2"
for i:=1 to 1024
if h==NIL
? "starting at", hb_ntos(i)
endif
h:=fcreate("_tst2.dat")
n1:=i*32
n2:=fwrite(h,space(n1))
fclose(h)
if n1!=n2
? str(i,4), str(n1,5), str(n2,5), h
if inkey(10) != 13
exit
endif
endif
next
wait
return
----------------------------------------------------

and then modified version with:
for i:=641 to 1024

After tests paste here screens please.
TIA


--
Regards,
Jaroslaw Ksdziola

francesco perillo

unread,
Apr 21, 2011, 2:59:23 AM4/21/11
to harbou...@googlegroups.com
ok, I will later today

(any idea on missing ESC key from the keyboard ?? do you use
alternative soft-keywords ??)

Jaroslaw Kadziola

unread,
Apr 21, 2011, 4:01:39 AM4/21/11
to francesco perillo
Hi ,

fp> ok, I will later today

Thanks for info.

fp> (any idea on missing ESC key from the keyboard ?? do you use
fp> alternative soft-keywords ??)

Install on handheld any soft-keyboard with Esc key

- or -

insert 3 lines to wcecon.prg

------------------------------------------
Set Key 97 To proc_exit // (letter 'a')

****************
Proc proc_exit
****************
Keyboard Chr(27)
-------------------------------------------

--
Regards,
Jaroslaw Kadziola

Przemysław Czerpak

unread,
Apr 21, 2011, 4:20:34 AM4/21/11
to harbou...@googlegroups.com
On Thu, 21 Apr 2011, francesco perillo wrote:

Hi Francesco,

> (any idea on missing ESC key from the keyboard ?? do you use
> alternative soft-keywords ??)

Do you have CTRL emulator?
If yes then CHR( 64 + 27 ) == "[" so you can use
CTRL + [
and it should give the same keycode as ESC.

best regards,
Przemek

francesco perillo

unread,
Apr 21, 2011, 4:29:56 AM4/21/11
to harbou...@googlegroups.com
Przemek, I found this trick on google but I was not able to use it on
this keyboard.
This mobile model has both a "real" keyboard and a "soft" one. With
the soft one I was not able to do this combination...

Do you know of a good instllable softkeyboard that is configurable ?
(the trick to map a key to ESC in prg ode is good, but I'd like a
"real" esc...)

BWT: I'm going to start a crossbuild of Qt for windows ce from
linux... somebody was able to do it... just testing... it may be
really interesting....


2011/4/21 Przemysław Czerpak <dru...@acn.waw.pl>:

Jaroslaw Kadziola

unread,
Apr 21, 2011, 4:51:40 AM4/21/11
to francesco perillo
Hi,

fp> Do you know of a good instllable softkeyboard that is configurable ?
fp> (the trick to map a key to ESC in prg ode is good, but I'd like a
fp> "real" esc...)

I'm using good keyboard from :
http://firma.sunnysoft.cz/htc/

It's localization for cee or greek language.

--
Regards,
Jaroslaw Kadziola

francesco perillo

unread,
Apr 22, 2011, 4:43:41 AM4/22/11
to harbou...@googlegroups.com
Both tests completed withour problems.

By problems I mean this IF:

francesco perillo

unread,
Apr 22, 2011, 4:47:53 AM4/22/11
to harbou...@googlegroups.com
I used this trick and it worked ok !

thanks

Jarosław Kądzioła

unread,
Apr 22, 2011, 4:43:13 PM4/22/11
to francesco perillo
Hi,

> Both tests completed withour problems.

Strange... i have few devices with WM5, WM6 and WM6.5.
On WM5 all is OK but on WM6 and WM6.5 i have big problems
with RDD. At this moment i haven't access to my
'harbour host' but after Easter i'll be back
to this topic.

Happy Easter !


--
Regards
Jaroslaw Kadziola


Reply all
Reply to author
Forward
0 new messages