xref: /reactos/sdk/lib/3rdparty/stlport/doc/README.evc8 (revision 80774a2f)
1setup VC8 for CE:
2------------------
3
4- VC8 doesn't have any setup batchfiles that prepare the environment for compiling
5with CE. You can take those from eVC4 and adapt them or write your own. This snippet
6should get you going:
7
8  rem you need to adapt at least these three
9  set OSVERSION=WCE500
10  set PLATFORM=MY_OWN_PLATFORM
11  set TARGETCPU=MIPSII
12
13  rem the compiler is always cl.exe, different compilers are in different paths
14  set CC=cl.exe
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
18
19  set PATH=%VSINSTALLDIR%\VC\ce\bin\x86_mips;%VSINSTALLDIR%\VC\bin;%VSINSTALLDIR%\Common7\IDE;%PATH%
20  set PLATFORMROOT=%SDKROOT%\%OSVERSION%\%PLATFORM%
21
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%
25
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%
29
30
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):
34
35  set OSVERSION=WCE420
36  set PLATFORM=POCKET PC 2003
37  set TARGETCPU=ARMV4
38
39  rem the compiler is always cl.exe, different compilers are in different paths
40  set CC=cl.exe
41
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
45
46  set PATH=%VSINSTALLDIR%\VC\ce\bin\x86_arm;%VSINSTALLDIR%\VC\bin;%VSINSTALLDIR%\Common7\IDE;%PATH%
47  set PLATFORMROOT=%SDKROOT%\PocketPC2003
48
49  rem add libs and includes from the SDK
50  set INCLUDE=%PLATFORMROOT%\include
51  set LIB=%PLATFORMROOT%\lib\%TARGETCPU%
52
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%
56
57
58You should now be able to run cl.exe for the target you expected.
59
60- The cross compilers of VC8 are the same version as for the native target, i.e. MSC14.
61
62- The cross compiler for MIPS has the same bug as mentioned in doc/README.evc4 and
63the same workaround applies. However, using 'whole program optimization', it results
64in an error in the link phase.
65
66- In order for STLport to recognize which target you are compiling for, you need to have
67some macros defined, e.g. for the target architecture. The compilers do that partially on
68their own, but not sufficiently. Therefore, STLport requires these defines:
69
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:
73  _WIN32_WCE=$(CEVER);
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:
79  NDEBUG;
80 -- For debug builds:
81  DEBUG;_DEBUG;
82 -- For debug builds with additional STLport diagnostics:
83  DEBUG;_DEBUG;_STLP_DEBUG;
84 -- For MFC applications:
85  _AFXDLL;
86
87- Further settings:
88 Code generation: Multithreaded [Debug] DLL
89 Language: enable RTTI
90 Optimization: maximise speed and enable whole program optimization for release builds
91
92- Linker settings:
93 Ignore specific libraries: libc.lib;libcd.lib
94 Commandline: /SUBSYSTEM:WINDOWSCE
95 Optimisation: /LTCG for release builds
96
97- Resource compiler:
98 Define: UNDER_CE;WINCE;_WIN32_WCE=$(CEVER)
99