Skip to main content

Cannot compile CLDC for the WinCe

7 replies [Last post]
timchen
Offline
Joined: 2003-12-13

I check out the source code from SVN, version is 11740.
Apply the Davy's patch from http://www.cs.kuleuven.be/~davy/phoneme/feature.htm.
I can compile javacall and pcsl successfully, but cannot compile the CLDC.

Here is my compile tools:

VS2005
cyg4me
j2sdk1.4.2_17
Pocket PC 2003 SDK

Here is my compile script:

call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
set MEHOME=C:/phoneme_feature
set BUILD_OUTPUT_DIR=%MEHOME%/build_output
set JDK_DIR=C:/j2sdk1.4.2_17
set CYG4ME=C:/cyg4me
set PATH=%CYG4ME%/bin;%JDK_DIR%/bin;%PATH%

set USE_VS2005=true
set VS2005_ROOT=C:/PROGRA~1/MICROS~3

set PATH=%VS2005_ROOT%/Common7/IDE;%VS2005_ROOT%/vc/bin;%PATH%
set LIB=%VS2005_ROOT%/vc/lib;%VS2005_ROOT%/vc/PlatformSDK/lib
set INCLUDE=%VS2005_ROOT%/vc/include;%VS2005_ROOT%/vc/PlatformSDK/include;%VS2005_ROOT%/vc/atlmfc/include

set WCEROOT=C:/PROGRA~1/WIEB7A~1/wce420/PSIONT~1

set VS2005_CE_ARM_LIB=%WCEROOT%/lib/armv4
set VS2005_CE_ARM_INCLUDE=%WCEROOT%/include/armv4

set VS2005_CE_ARM_PATH=%VS2005_ROOT%/vc/ce/bin/x86_arm
set VS2005_COMMON_PATH=%VS2005_ROOT%/vc/bin

set JVMWorkSpace=%MEHOME%/cldc
set JVMBuildSpace=%BUILD_OUTPUT_DIR%/cldc
set ENABLE_PCSL=true
set PCSL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/pcsl
set VERBOSE_BUILD=true

cd %JVMWorkSpace%/build/wince_arm

make ENABLE_PCSL=true PCSL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/pcsl ENABLE_ISOLATES=true JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall

Here are error message:

C:/PROGRA~1/MICROS~3/vc/ce/bin/x86_arm/cl.exe /Zi /Od /Zm200 -I"../generated" -
I"C:/phoneme_feature/cldc/src/vm/share/compiler" -I"C:/phoneme_feature/cldc/src/
vm/share/debugger" -I"C:/phoneme_feature/cldc/src/vm/share/handles" -I"C:/phonem
e_feature/cldc/src/vm/share/memory" -I"C:/phoneme_feature/cldc/src/vm/share/inte
rpreter" -I"C:/phoneme_feature/cldc/src/vm/share/isolate" -I"C:/phoneme_feature/
cldc/src/vm/share/natives" -I"C:/phoneme_feature/cldc/src/vm/share/reflection" -
I"C:/phoneme_feature/cldc/src/vm/share/runtime" -I"C:/phoneme_feature/cldc/src/v
m/share/utilities" -I"C:/phoneme_feature/cldc/src/vm/share/ROM" -I"C:/phoneme_fe
ature/cldc/src/vm/share/verifier" -I"C:/phoneme_feature/cldc/src/vm/share/float"
-I"C:/phoneme_feature/cldc/src/vm/os/utilities" -I"C:/phoneme_feature/cldc/src/
vm/share/memoryprofiler" -I"C:/phoneme_feature/cldc/src/vm/os/wince" -I"C:/phone
me_feature/cldc/src/midp" -I"C:/phoneme_feature/cldc/src/vm/cpu/arm" -I"C:/phone
me_feature/cldc/src/vm/cpu/c" -I"C:/phoneme_feature/cldc/src/vm/cpu/i386" -I"C:/
phoneme_feature/cldc/src/vm/cpu/sh" -I"C:/phoneme_feature/cldc/src/vm/cpu/thumb"
-I"C:/phoneme_feature/cldc/src/vm/cpu/thumb2" -I"C:/phoneme_feature/cldc/src/an
ilib/share" -I"C:/phoneme_feature/cldc/src/anilib/wince" -I"C:/phoneme_feature/c
ldc/src/tools/ads_extender" -I"C:/phoneme_feature/build_output/pcsl/wince_arm/in
c" -DARM /D "_DEBUG" /D "AZZERT" /D "DEBUG" /X /I"C:/PROGRA~1/WIEB7A~1/wce420/PS
IONT~1/include/armv4" -DREQUIRES_JVMCONFIG_H=1 /W3 -D_WIN32_WCE=0x501 -DARM -D_A
RM -D_ARM_ -DUNDER_CE=0x501 -DUNICODE -D_UNICODE /nologo -DHARDWARE_LITTLE_ENDI
AN=1 -DHOST_LITTLE_ENDIAN=1 -DMSW_FIRST_FOR_DOUBLE=1 /D "ROMIZING" -DJVM_RELEASE
_VERSION='"1.1"' -DJVM_BUILD_VERSION='"internal"' -DJVM_NAME='"phoneME Feature V
M"' /Zi /Od /Zm200 /Fp"cldchi.pch" \
/Yc"incls/_precompiled.incl" /c ../generated/_build_pch_visCPP.cpp
cl : Command line error D8038 : invalid argument '../generated -IC:/phoneme_feat
ure/cldc/src/vm/share/compiler -IC:/phoneme_feature/cldc/src/vm/share/debugger -
IC:/phoneme_feature/cldc/src/vm/share/handles -IC:/phoneme_feature/cldc/src/vm/s
hare/memory -IC:/phoneme_feature/cldc/src/vm/share/interpreter -IC:/phoneme_feat
ure/cldc/src/vm/share/isolate -IC:/phoneme_feature/cldc/src/vm/share/natives -IC
:/phoneme_feature/cldc/src/vm/share/reflection -IC:/phoneme_feature/cldc/src/vm/
share/runtime -IC:/phoneme_feature/cldc/src/vm/share/utilities -IC:/phoneme_feat
ure/cldc/src/vm/share/ROM -IC:/phoneme_feature/cldc/src/vm/share/verifier -IC:/p
honeme_feature/cldc/src/vm/share/float -IC:/phoneme_feature/cldc/src/vm/os/utili
ties -IC:/phoneme_feature/cldc/src/vm/share/memoryprofiler -IC:/phoneme_feature/
cldc/src/vm/os/wince -IC:/phoneme_feature/cldc/src/midp -IC:/phoneme_feature/cld
c/src/vm/cpu/arm -IC:/phoneme_feature/cldc/src/vm/cpu/c -IC:/phoneme_feature/cld
c/src/vm/cpu/i386 -IC:/phoneme_feature/cldc/src/vm/cpu/sh -IC:/phoneme_feature/c
ldc/src/vm/cpu/thumb -IC:/phoneme_feature/cldc/src/vm/cpu/thumb2 -IC:/phoneme_fe
ature/cldc/src/anilib/share -IC:/phoneme_feature/cldc/src/anilib/wince -IC:/phon
eme_feature/cldc/src/tools/ads_extender -IC:/phoneme_feature/build_output/pcsl/w
ince_arm/inc -DARM'
make[1]: *** [_build_pch_visCPP.obj] Error 2
make[1]: Leaving directory `C:/phoneme_feature/build_output/cldc/wince_arm/targe
t/debug'
make: *** [_debug] Error 2

C:\phoneme_feature\cldc\build\wince_arm>

Please give me a help!!!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
geelpheels
Offline
Joined: 2006-05-05

Hi,chen.
Could you tell me what c runtime are you using when you compile the cldc with evc?

davyp
Offline
Joined: 2007-01-03

I don't know what you actually mean with "c runtime", but I assume you are referring
to the headers and libraries to compile and link against?

You should be able to compile CLDC just fine with eVC4 if you have installed the
Windows Mobile 2003/5 SDKs. Make sure you link against the ARM libraries and not
the x86 version.

Davy

geelpheels
Offline
Joined: 2006-05-05

That's what I exactly mean.When I build the file GlobalDefinitions_visCPP.hpp, it reported io.h cannot be found. It is an ansi C header file. It cannot be found in the windows mobile sdk include directory. How did you solve that? Thanks.

davyp
Offline
Joined: 2007-01-03

Hi geelpheels,

First of all, I don't think io.h is is part of the ANSI/ISO C and C++ standards, but rather a
Visual C++ specific header file. A search for io.h on my system gave only two results:
\program files\microsoft visual studio 8\vc\crt\src\io.h
\program files\microsoft visual studio 8\vc\include\io.h

These are Visual Studio 2005 files, so if you are using eVC 4.0, then I guess something is
wrong with some of the settings to the correct libraries and headers. Anyway, I have the
required libraries and headers in:

C:\Program Files\Windows CE Tools\wce400
C:\Program Files\Windows CE Tools\wce420
C:\Program Files\Windows CE Tools\wce500

In your case, you should be looking in:
C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\include\armv4
C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\include\lib

The compiler tools to be used are in:
C:\Program Files\Microsoft eMbedded C++ 4.0\EVC\wce420\bin

I also set the following environment variables in a batch file:

set EVC_ARM_INCLUDE=C:/PROGRA~1/WIEB7A~1/wce420/POCKET~1/include/armv4
set EVC_ARM_LIB=C:/PROGRA~1/WIEB7A~1/wce420/POCKET~1/lib/armv4
set EVC_ARM_PATH=C:/PROGRA~1/MICROS~1.0/EVC/wce420/bin

Note that I use the abbreviated DOS 8.3 style file names to avoid issues with long file names
and spaces in them. They might be different on your system. Just do a "dir /x" at the
command prompt and you get both the short and full name.

Davy

davyp
Offline
Joined: 2007-01-03

With the patches and builds on my website, I am able to compile CLDC but
my approach is a bit different. For CLDC specifically, I do not use the
javacall porting layer nor PCSL. For the MIDP builds, I use PCSL without
javacall.

The only difference for PocketPC 2003, is that I use the Embedded Visual
C++ 4.0 compiler.

export EVC_ARCH_PATH="/cygdrive/c/PROGRA~1/MICROS~1.0/EVC/wce420/bin"
export EVC_COMMON_PATH="C:/PROGRA~1/MICROS~1.0/Common/EVC/bin"

export TOP=c:/phoneme_feature
export OUTPUT=c:/out

cd $TOP/cldc/build/wince_arm
make JDK_DIR=c:/j2sdk1.4.2_17 \
JVMWorkSpace=$TOP/cldc JVMBuildSpace=$OUTPUT/cldc \
EVC_ARCH_PATH="$EVC_ARCH_PATH" EVC_COMMON_PATH="$EVC_COMMON_PATH" \
ENABLE_ISOLATES=true USE_VS2005=false

That's it,
Davy

timchen
Offline
Joined: 2003-12-13

Davy,

I try to use the evc to compile the CLDC without javacall,PCSL. But i got the follow error:

C:/PROGRA~1/MICROS~1.0/EVC/wce420/bin/clarm.exe /Zi /Od /Zm200 -I"../generated"
-I"C:/phoneme_feature/cldc/src/vm/share/compiler" -I"C:/phoneme_feature/cldc/sr
c/vm/share/debugger" -I"C:/phoneme_feature/cldc/src/vm/share/handles" -I"C:/phon
eme_feature/cldc/src/vm/share/memory" -I"C:/phoneme_feature/cldc/src/vm/share/in
terpreter" -I"C:/phoneme_feature/cldc/src/vm/share/isolate" -I"C:/phoneme_featur
e/cldc/src/vm/share/natives" -I"C:/phoneme_feature/cldc/src/vm/share/reflection"
-I"C:/phoneme_feature/cldc/src/vm/share/runtime" -I"C:/phoneme_feature/cldc/src
/vm/share/utilities" -I"C:/phoneme_feature/cldc/src/vm/share/ROM" -I"C:/phoneme_
feature/cldc/src/vm/share/verifier" -I"C:/phoneme_feature/cldc/src/vm/share/floa
t" -I"C:/phoneme_feature/cldc/src/vm/os/utilities" -I"C:/phoneme_feature/cldc/sr
c/vm/share/memoryprofiler" -I"C:/phoneme_feature/cldc/src/vm/os/wince" -I"C:/pho
neme_feature/cldc/src/midp" -I"C:/phoneme_feature/cldc/src/vm/cpu/arm" -I"C:/pho
neme_feature/cldc/src/vm/cpu/c" -I"C:/phoneme_feature/cldc/src/vm/cpu/i386" -I"C
:/phoneme_feature/cldc/src/vm/cpu/sh" -I"C:/phoneme_feature/cldc/src/vm/cpu/thum
b" -I"C:/phoneme_feature/cldc/src/vm/cpu/thumb2" -I"C:/phoneme_feature/cldc/src/
anilib/share" -I"C:/phoneme_feature/cldc/src/anilib/wince" -I"C:/phoneme_feature
/cldc/src/tools/ads_extender" -DARM /D "_DEBUG" /D "AZZERT" /D "DEBUG" /X /I"C:/
PROGRA~1/WINDOW~4/wce420/POCKET~1/include/armv4" -DREQUIRES_JVMCONFIG_H=1 /W3 -D
_WIN32_WCE=400 -DARM -D_ARM -D_ARM_ -DUNDER_CE=400 -DUNICODE -D_UNICODE /nologo
-DHARDWARE_LITTLE_ENDIAN=1 -DHOST_LITTLE_ENDIAN=1 -DMSW_FIRST_FOR_DOUBLE=1 /D "
ROMIZING" -DJVM_RELEASE_VERSION='"1.1"' -DJVM_BUILD_VERSION='"internal"' -DJVM_N
AME='"phoneME Feature VM"' /Zi /Od /Zm200 /Fp"cldchi.pch" \
/Yc"incls/_precompiled.incl" /c ../generated/_build_pch_visCPP.cpp
Command line error D2030 : INTERNAL COMPILER ERROR in 'C:\PROGRA~1\MICROS~1.0\EV
C\wce420\bin\clarm.exe'
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
make[1]: *** [_build_pch_visCPP.obj] Error 2
make[1]: Leaving directory `C:/phoneme_feature/build_output/cldc/wince_arm/targe
t/debug'
make: *** [_debug] Error 2

davyp
Offline
Joined: 2007-01-03

The "INTERNAL COMPILER ERROR" error is probably due to a set of incompatible compiler flags, but I am not sure. You will have to google around a bit to see how to resolve it.

Davy