How to build Harbour for Windows Mobile 6.5 using VS2012

191 views
Skip to first unread message

Antonio Linares

unread,
Jan 22, 2014, 8:57:21 AM1/22/14
to harbou...@googlegroups.com
I am trying to build Harbour for Windows Mobile 6.5 (arm) using this batch file:

call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\bin\x86_arm\vcvarsx86_arm.bat"
set HB_USER_CFLAGS=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
win-make.exe

It fails with:

c:\harbour\src\3rd\png\png.h(3209) : error C2143: syntax error : missing ')' bef
ore '*'
c:\harbour\src\3rd\png\png.h(3209) : error C2081: 'FILE' : name in formal parame
ter list illegal
c:\harbour\src\3rd\png\png.h(3209) : error C2143: syntax error : missing '{' bef
ore '*'
c:\harbour\src\3rd\png\png.h(3209) : error C2059: syntax error : 'type'
c:\harbour\src\3rd\png\png.h(3209) : error C2059: syntax error : ')'
win-make.exe[4]: *** [png.obj] Error 2
win-make.exe[3]: *** [descend] Error 2
win-make.exe[2]: *** [png] Error 2
win-make.exe[1]: *** [3rd] Error 2
win-make.exe: *** [src] Error 2

Isn't supported ? thanks

regards

Antonio

Antonio Linares

unread,
Jan 23, 2014, 1:45:06 PM1/23/14
to harbou...@googlegroups.com
Replacing FILE with void in png.h(3209) it compiles some more modules but finally crashes.

It seems as we can't use VS2012 to build Harbour for Windows Mobile 6.5, unless I am wrong.

regards

Antonio

Antonio Linares

unread,
Jan 23, 2014, 5:34:14 PM1/23/14
to harbou...@googlegroups.com
A new try: (using VS2012)

call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_arm
set HB_COMPILER=msvcarm
set HB_USER_CFLAGS=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
win-make

If I set HB_USER_CFLAGS as 
set HB_USER_CFLAGS=/DFILE=void* /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE

then the first file gets compiled and stops on the next one:
cl.exe   -I. -I../../../../../../include -nologo -D_M_ARM -DARM -D_ARM_ -TC -W2
-Os -Gy  -DUNICODE -DUNDER_CE -Ic:/harbour/src/3rd/zlib -DPNG_NO_STDIO /DFILE=vo
id* /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -Fopngerror.obj  -c ../../../p
ngerror.c
pngerror.c
../../../pngerror.c(725) : error C2065: 'stderr' : undeclared identifier
../../../pngerror.c(727) : error C2065: 'stderr' : undeclared identifier
../../../pngerror.c(788) : error C2065: 'stderr' : undeclared identifier
../../../pngerror.c(789) : error C2065: 'stderr' : undeclared identifier

keep trying it...

Antonio



Antonio Linares

unread,
Jan 23, 2014, 5:37:56 PM1/23/14
to harbou...@googlegroups.com
The if I use:

set HB_USER_CFLAGS=/Dstderr=2 /DFILE=void* /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE

I can keep compiling mich more Harbour core files

I think that with some minor fixes we could make Harbour (WinCE) compatible with VS2012 Express.

Help is welcome, thanks


Antonio

Przemyslaw Czerpak

unread,
Jan 23, 2014, 6:00:02 PM1/23/14
to harbou...@googlegroups.com
On Thu, 23 Jan 2014, Antonio Linares wrote:

Hi,
The critical is what you set in general build settings (beginning
of setdout harbour build output) and you haven't sent this part of
code. I guess platform is not WCE but rather pure WIN so STDIO is
not disable. You can disable STDIO in PNG library by:

set HB_USER_CFLAGS=-DPNG_NO_STDIO

best regards,
Przemek

Antonio Linares

unread,
Jan 23, 2014, 6:10:00 PM1/23/14
to harbou...@googlegroups.com
Przemek,

thanks for your help. I am using this batch file:

call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_arm
set HB_COMPILER=msvcarm
set HB_USER_CFLAGS=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
set LIB=%LIB%;"c:\Windows Mobile 5.0 Pocket PC SDK\Lib\ARMV4I"
win-make

but it errors trying to compile png.c. I have added /D-DPNG_NO_STDIO also but no effect.

If would be great that we may be able to use VS2012 to build Harbour for WinCE. thanks

Antonio

Przemyslaw Czerpak

unread,
Jan 23, 2014, 6:17:59 PM1/23/14
to harbou...@googlegroups.com
On Thu, 23 Jan 2014, Antonio Linares wrote:

Hi,

> thanks for your help. I am using this batch file:
> call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
> x86_arm
> set HB_COMPILER=msvcarm
> set HB_USER_CFLAGS=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
> set LIB=%LIB%;"c:\Windows Mobile 5.0 Pocket PC SDK\Lib\ARMV4I"
> win-make

Can you redirect win-make to file and sent here initial few lines
begininning with "!". The last interesting one is:
! GIT_REVISION: *******

> but it errors trying to compile png.c. I have added /D-DPNG_NO_STDIO also
> but no effect.

Looks like too much "D" C compiler options with different prefixes.
Try: /DPNG_NO_STDIO

(in the requested output we can see what exactly is used).

best regards,
Przemek

Antonio Linares

unread,
Jan 23, 2014, 6:44:48 PM1/23/14
to harbou...@googlegroups.com
Przemek,

I just did a clean checkout and this is the log:

the batch file:
call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_arm
set HB_COMPILER=msvcarm
set HB_USER_CFLAGS=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
set LIB=%LIB%;"c:\Windows Mobile 5.0 Pocket PC SDK\Lib\ARMV4I"
win-make > output.txt 

output.txt:
! Building Harbour 3.2.0dev from source - http://harbour-project.org
! MAKE: win-make 3.82 sh.exe   
! HB_USER_CFLAGS: /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
! HB_HOST_PLAT: win (x86_64)  HB_SHELL: nt
! HB_PLATFORM: wce (arm) (autodetected)
! HB_COMPILER: msvcarm 
! Component: 'zlib' found in c:/harbour/src/3rd/zlib (local)
! Component: 'pcre' found in c:/harbour/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
win-make[1]: Nothing to be done for `all'.
win-make[1]: Nothing to be done for `all'.
! 'hbpmcom' library skipped (platform or compiler not supported)
cl.exe   -I. -I../../../../../../include -nologo -D_M_ARM -DARM -D_ARM_ -TC -W2 -Os -Gy  -DUNICODE -DUNDER_CE -Ic:/harbour/src/3rd/zlib -DPNG_NO_STDIO /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -Fopng.obj  -c ../../../png.c
png.c
c:\harbour\src\3rd\png\png.h(3209) : error C2143: syntax error : missing ')' before '*'
c:\harbour\src\3rd\png\png.h(3209) : error C2081: 'FILE' : name in formal parameter list illegal
c:\harbour\src\3rd\png\png.h(3209) : error C2143: syntax error : missing '{' before '*'
c:\harbour\src\3rd\png\png.h(3209) : error C2059: syntax error : 'type'
c:\harbour\src\3rd\png\png.h(3209) : error C2059: syntax error : ')'

thanks

Antonio

Antonio Linares

unread,
Jan 23, 2014, 6:46:35 PM1/23/14
to harbou...@googlegroups.com
With your proposed flag:

! Building Harbour 3.2.0dev from source - http://harbour-project.org
! MAKE: win-make 3.82 sh.exe   
! HB_USER_CFLAGS: /DPNG_NO_STDIO /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
! HB_HOST_PLAT: win (x86_64)  HB_SHELL: nt
! HB_PLATFORM: wce (arm) (autodetected)
! HB_COMPILER: msvcarm 
! Component: 'zlib' found in c:/harbour/src/3rd/zlib (local)
! Component: 'pcre' found in c:/harbour/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
win-make[1]: Nothing to be done for `all'.
win-make[1]: Nothing to be done for `all'.
! 'hbpmcom' library skipped (platform or compiler not supported)
cl.exe   -I. -I../../../../../../include -nologo -D_M_ARM -DARM -D_ARM_ -TC -W2 -Os -Gy  -DUNICODE -DUNDER_CE -Ic:/harbour/src/3rd/zlib -DPNG_NO_STDIO /DPNG_NO_STDIO /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE -Fopng.obj  -c ../../../png.c
png.c
c:\harbour\src\3rd\png\png.h(3209) : error C2143: syntax error : missing ')' before '*'
c:\harbour\src\3rd\png\png.h(3209) : error C2081: 'FILE' : name in formal parameter list illegal
c:\harbour\src\3rd\png\png.h(3209) : error C2143: syntax error : missing '{' before '*'
c:\harbour\src\3rd\png\png.h(3209) : error C2059: syntax error : 'type'
c:\harbour\src\3rd\png\png.h(3209) : error C2059: syntax error : ')'

thanks for your help

Antonio

Przemyslaw Czerpak

unread,
Jan 23, 2014, 7:16:21 PM1/23/14
to harbou...@googlegroups.com
Hi,

On Thu, 23 Jan 2014, Antonio Linares wrote:
The problem is in PNG library.
Looks that newer versions fixed it.
In the one used in Harbour you may try to disable
PNG_SIMPLIFIED_WRITE_SUPPORTED as temporary workaround.

In spare time (hope in next week) I'll upgrade PNG and some other
3-rd party libraries.

best regards,
Przemek

Antonio Linares

unread,
Jan 23, 2014, 7:26:17 PM1/23/14
to harbou...@googlegroups.com
Przemek,

ok, I see, thanks

The further I have gone was using:

1. set HB_USER_CFLAGS=/Dstderr=2 /DFILE=void* /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
(compiles many, then stops)

2. set HB_USER_CFLAGS=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
(more)

3. set HB_USER_CFLAGS=/D__STDC__ /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
(more and finally stops here:)
../../../hbdate.c(963) : error C3861: 'GetProcAddressA': identifier not found
win-make[3]: *** [hbdate.obj] Error 2
win-make[2]: *** [descend] Error 2
win-make[1]: *** [common] Error 2
win-make: *** [src] Error 2

Please notice that I used /D__STDC__ to bypass hbwince.c or stops there.

many thanks

Antonio

Reply all
Reply to author
Forward
0 new messages