4 - VC8 doesn't have any setup batchfiles that prepare the environment for compiling
5 with CE. You can take those from eVC4 and adapt them or write your own. This snippet
8 rem you need to adapt at least these three
10 set PLATFORM=MY_OWN_PLATFORM
13 rem the compiler is always cl.exe, different compilers are in different paths
15 rem obviously, these need to be adjusted to where you installed VS2005 and the SDKs
16 set VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
17 set SDKROOT=C:\Programme\Windows CE Tools
19 set PATH=%VSINSTALLDIR%\VC\ce\bin\x86_mips;%VSINSTALLDIR%\VC\bin;%VSINSTALLDIR%\Common7\IDE;%PATH%
20 set PLATFORMROOT=%SDKROOT%\%OSVERSION%\%PLATFORM%
22 rem add libs and includes from the SDK
23 set INCLUDE=%PLATFORMROOT%\include\%TARGETCPU%;%PLATFORMROOT%\MFC\include;%PLATFORMROOT%\ATL\include
24 set LIB=%PLATFORMROOT%\lib\%TARGETCPU%;%PLATFORMROOT%\MFC\lib\%TARGETCPU%;%PLATFORMROOT%\ATL\lib\%TARGETCPU%
26 rem add libs that came with VC8
27 rem Note: there are more libs and includes under ce\atlmfc, not sure if these are needed.
28 set LIB=%LIB%;%VSINSTALLDIR%\VC\ce\lib\%TARGETCPU%
31 - The snippet below can be used to build STLport for Pocket PC 2003 (using the
32 Pocket PC 2003 SDK shipped with Visual Studio 2005, this is the SDK used when
33 compiling programs from within the IDE):
36 set PLATFORM=POCKET PC 2003
39 rem the compiler is always cl.exe, different compilers are in different paths
42 rem obviously, these need to be adjusted to where you installed VS2005
43 set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8
44 set SDKROOT=%VSINSTALLDIR%\SmartDevices\SDK
46 set PATH=%VSINSTALLDIR%\VC\ce\bin\x86_arm;%VSINSTALLDIR%\VC\bin;%VSINSTALLDIR%\Common7\IDE;%PATH%
47 set PLATFORMROOT=%SDKROOT%\PocketPC2003
49 rem add libs and includes from the SDK
50 set INCLUDE=%PLATFORMROOT%\include
51 set LIB=%PLATFORMROOT%\lib\%TARGETCPU%
53 rem add libs that came with VC8
54 set INCLUDE=%INCLUDE%;%VSINSTALLDIR%\VC\ce\atlmfc\include
55 set LIB=%LIB%;%VSINSTALLDIR%\VC\ce\lib\%TARGETCPU%;%VSINSTALLDIR%\VC\ce\atlmfc\lib\%TARGETCPU%
58 You should now be able to run cl.exe for the target you expected.
60 - The cross compilers of VC8 are the same version as for the native target, i.e. MSC14.
62 - The cross compiler for MIPS has the same bug as mentioned in doc/README.evc4 and
63 the same workaround applies. However, using 'whole program optimization', it results
64 in an error in the link phase.
66 - In order for STLport to recognize which target you are compiling for, you need to have
67 some macros defined, e.g. for the target architecture. The compilers do that partially on
68 their own, but not sufficiently. Therefore, STLport requires these defines:
70 -- These are generally set for CE:
71 _UNICODE;UNICODE;_WIN32;WIN32;UNDER_CE;WINCE;
72 -- This one uses an environment variable to set the CE version:
74 -- These are used to help STLport recognise the target architecture:
75 $(ARCHFAM);$(_ARCHFAM_);$(INSTRUCTIONSET)
76 Note that the instructionset is not strictly needed for x86 but definitely for ARM. It
77 doesn't hurt for x86 though, so I'd always set these in any new project.
78 -- For release builds:
82 -- For debug builds with additional STLport diagnostics:
83 DEBUG;_DEBUG;_STLP_DEBUG;
84 -- For MFC applications:
88 Code generation: Multithreaded [Debug] DLL
90 Optimization: maximise speed and enable whole program optimization for release builds
93 Ignore specific libraries: libc.lib;libcd.lib
94 Commandline: /SUBSYSTEM:WINDOWSCE
95 Optimisation: /LTCG for release builds
98 Define: UNDER_CE;WINCE;_WIN32_WCE=$(CEVER)