📜 ⬆️ ⬇️

Windows Cross-compile POCO for WinCE

POCO is a lightweight, multiplatform open-source set of libraries and C ++ classes that facilitate the writing of multiplatform software.
Available under the Boost Software License.
More information about POCO:
pocoproject.org/features.html
ru.wikipedia.org/wiki/POCO
Well-organized class structure documentation is available in html online, html offline.
Documentation on basic features with examples of use - in pdf: pocoproject.org/documentation/index.html

POCO has the richest functionality - a lot - everything that is needed for a happy life of a C ++ programmer! The toolkit works perfectly, it has a well thought-out API.

POCO is collected for a large number of OS, incl. Desktop Windows, Windows CE, Linux.
')
From my own experience, I note that POCO for these OS is going without problems.
I will try to you, dear C ++ developers, in my three articles "Cross-compile POCO from Windows."

The article “Cross-compile POCO from Windows for Linux” habrahabr.ru/post/222661

Windows Cross-compile POCO for WinCE custom SDK


The method covered here was developed:
- for Windows CE SDK terminal XAC (ARM9, Windows CE 6.0)
- Windows 7 host machine 64
- build POCO from the Visual Studio 2008 environment
- POCO Basic Edition 1.4.6p4

IDE and SDK preparation

Small educational program:
- according to the information I have, VS2005 or VS2008 is used for development and debugging under Windows CE
- debugging of the program with Windows CE devices is performed using the special ActiveSync tool "Windows Mobile Device Center"
Read more in the wiki: ru.wikipedia.org/wiki/ActiveSync. Working with ActiveSync is simple - you connect a Windows Mobile device via USB to the host machine, ActiveSync finds the device and go ahead. Now you can open its file system in Explorer or debug your program from Visual Studio 2008.

1. Download and consistently install the following programs:
Microsoft Visual Studio 2008 Professional "Visual Studio 2008 Professional.zip" rutracker.org
Microsoft Visual Studio 2008 sp1 "VS90sp1-KB945140-ENU.exe" www.microsoft.com/en-us/download/details.aspx?id=10986
Windows Mobile 6 SDK "Windows Mobile 6 Professional SDK Refresh.msi" www.microsoft.com/en-us/download/details.aspx?id=6135
Windows Mobile 6.1 SDK "Windows Mobile 6.1 Emulator Images" www.microsoft.com/en-us/download/details.aspx?id=16182

2. Download and install Custom SDK for your device.
For example, I have: “SAIO_CE60_SDK_R16.msi” I downloaded it from the hardware manufacturer.
BUT! If the special SDK cannot be found, you can run programs compiled under the standard Windows Mobile SDK downloaded from Microsoft.
The standard SDK should be the same version of Windows CE as your device.

3. Check device detection.
Connect the device via USB to our computer, when the device is found on USB, ActiveSync should auto-launch. In Windows 7, the Portable Device subcategory should appear in the Computer category. Through it, you can view the file system of the WindowsCE device.

4. Check the launch of programs and debugging on the device.
Our device should be connected to item 3. Open VS2008 and create the project “VisualC ++” -> “Win32 Smart Device Project” by the wizard.
image
Compile and run it by pressing F5. Our test Win32 application should start successfully on the device.

Preparing the batch file of the SDK environment of our device

POCO will be built from the console. Before building, you need to set the variable environments to the environment of the SDK of our device.
A batch file can be written manually, according to a sample, or generated automatically.
Sample
@echo off
echo Environment Selection:SAIO_CE60_SDK_R16 (ARMV4I)
set PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;$(WindowsSdkDir)\bin;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common\Tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\;$(FrameworkSDKDir)Bin;%PATH%
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include;C:\SAIO_CE60_SDK_R16\include\ARMV4I;C:\SAIO_CE60_SDK_R16\include;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\atlmfc\include;C:\Program Files (x86)\Microsoft Visual Studio 9.0\SmartDevices\SDK\SQL Server\Mobile\v3.0
set LIB=C:\SAIO_CE60_SDK_R16\lib\ARMV4I;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\atlmfc\lib\ARMV4I;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\lib\ARMV4I


Automatic creation
It is more convenient to use the checksdk.exe utility from the Qt toolkit. This utility is used to display the names set on the Sdk system and generate a script for setting environment variables under the selected SDK. Just what you need.
- Download Qt archive for WindowsCE qt-project.org/downloads , at the time of this writing, this is the version of “Qt libraries 4.8.6 for Windows CE (269 MB) (Info)”
- unpack it somewhere, and in the directory / bin we find the utility checksdk.exe
-open command shell VS2008 "Visual Studio 2008 x64 Cross Tools Command Prompt"
image

-Install the current directory with the utility checksdk.exe
- run checksdk.exe -list and see the list of installed SDKs:
image

- form the environment batch file for the selected SDK:
checksdk.exe -sdk "SAIO_CE60_SDK_R16 (ARMV4I)" -script wm6.bat

POCO preparation

1. Prepare a directory with POCO:
- download to pocoproject.org/download/index.html POCO archive of the latest stable version of the Basic Edition. By the button "Sources for Linux, OS X, etc.". At the time of this writing, the archive is poco-1.4.6p4.tar.gz
-zip to a separate directory. For example, using WinRAR and in the directory C:/poco/poco-1.4.6p4-wince-SAIO_CE60_SDK_R16 I use the dash to indicate the SDK to distinguish the POCO versions.

2. Copy the batch file of the SDK environment to the root of the POCO directory.

3. Using the text search and replace program, in the POCO directory, replace:
- all occurrences of the string Digi JumpStart (ARMV4I) in the name of your Custom SDK, example: SAIO_CE60_SDK_R16 (ARMV4I)
-all entries in the string: <locale.h>
qfreplace i-vd.org.ru/soft/qfreplace.shtml

4. .
buildwin.
POCO build_CE_vs90.cmd , buildwin .
, ,
build_CE_vs90-all.cmd :
@echo off
buildwin 90 build all both WinCE samples

POCO
1. VS2008. Visual Studio 2008 x64 Win64 Command Prompt
image


2. POCO :
cd C:/poco/poco-1.4.6p4-wince-SAIO_CE60_SDK_R16

3. SDK. :
wm6.bat

4. POCO. :
build_CE_vs90-all.cmd

:
\bin\__sdk
\lib\__sdk
:
\bin\SAIO_CE60_SDK_R16 (ARMV4I)
\lib\SAIO_CE60_SDK_R16 (ARMV4I)


"POCO C++ Libraries GNU Make Build System" pocoproject.org/docs/99150-GMakeBuildNotes.html
"Building On Windows" pocoproject.org/docs/00200-GettingStarted.html

***

++ . , !

.
<locale.h>
qfreplace i-vd.org.ru/soft/qfreplace.shtml

4. .
buildwin.
POCO build_CE_vs90.cmd , buildwin .
, ,
build_CE_vs90-all.cmd :
@echo off
buildwin 90 build all both WinCE samples

POCO
1. VS2008. Visual Studio 2008 x64 Win64 Command Prompt
image


2. POCO :
cd C:/poco/poco-1.4.6p4-wince-SAIO_CE60_SDK_R16

3. SDK. :
wm6.bat

4. POCO. :
build_CE_vs90-all.cmd

:
\bin\__sdk
\lib\__sdk
:
\bin\SAIO_CE60_SDK_R16 (ARMV4I)
\lib\SAIO_CE60_SDK_R16 (ARMV4I)


"POCO C++ Libraries GNU Make Build System" pocoproject.org/docs/99150-GMakeBuildNotes.html
"Building On Windows" pocoproject.org/docs/00200-GettingStarted.html

***

++ . , !

.
<locale.h>
qfreplace i-vd.org.ru/soft/qfreplace.shtml

4. .
buildwin.
POCO build_CE_vs90.cmd , buildwin .
, ,
build_CE_vs90-all.cmd :
@echo off
buildwin 90 build all both WinCE samples

POCO
1. VS2008. Visual Studio 2008 x64 Win64 Command Prompt
image


2. POCO :
cd C:/poco/poco-1.4.6p4-wince-SAIO_CE60_SDK_R16

3. SDK. :
wm6.bat

4. POCO. :
build_CE_vs90-all.cmd

:
\bin\__sdk
\lib\__sdk
:
\bin\SAIO_CE60_SDK_R16 (ARMV4I)
\lib\SAIO_CE60_SDK_R16 (ARMV4I)


"POCO C++ Libraries GNU Make Build System" pocoproject.org/docs/99150-GMakeBuildNotes.html
"Building On Windows" pocoproject.org/docs/00200-GettingStarted.html

***

++ . , !

.
<locale.h>
qfreplace i-vd.org.ru/soft/qfreplace.shtml

4. .
buildwin.
POCO build_CE_vs90.cmd , buildwin .
, ,
build_CE_vs90-all.cmd :
@echo off
buildwin 90 build all both WinCE samples

POCO
1. VS2008. Visual Studio 2008 x64 Win64 Command Prompt
image


2. POCO :
cd C:/poco/poco-1.4.6p4-wince-SAIO_CE60_SDK_R16

3. SDK. :
wm6.bat

4. POCO. :
build_CE_vs90-all.cmd

:
\bin\__sdk
\lib\__sdk
:
\bin\SAIO_CE60_SDK_R16 (ARMV4I)
\lib\SAIO_CE60_SDK_R16 (ARMV4I)


"POCO C++ Libraries GNU Make Build System" pocoproject.org/docs/99150-GMakeBuildNotes.html
"Building On Windows" pocoproject.org/docs/00200-GettingStarted.html

***

++ . , !

.
<locale.h>
qfreplace i-vd.org.ru/soft/qfreplace.shtml

4. .
buildwin.
POCO build_CE_vs90.cmd , buildwin .
, ,
build_CE_vs90-all.cmd :
@echo off
buildwin 90 build all both WinCE samples

POCO
1. VS2008. Visual Studio 2008 x64 Win64 Command Prompt
image


2. POCO :
cd C:/poco/poco-1.4.6p4-wince-SAIO_CE60_SDK_R16

3. SDK. :
wm6.bat

4. POCO. :
build_CE_vs90-all.cmd

:
\bin\__sdk
\lib\__sdk
:
\bin\SAIO_CE60_SDK_R16 (ARMV4I)
\lib\SAIO_CE60_SDK_R16 (ARMV4I)


"POCO C++ Libraries GNU Make Build System" pocoproject.org/docs/99150-GMakeBuildNotes.html
"Building On Windows" pocoproject.org/docs/00200-GettingStarted.html

***

++ . , !

.
<locale.h>
qfreplace i-vd.org.ru/soft/qfreplace.shtml

4. .
buildwin.
POCO build_CE_vs90.cmd , buildwin .
, ,
build_CE_vs90-all.cmd :
@echo off
buildwin 90 build all both WinCE samples

POCO
1. VS2008. Visual Studio 2008 x64 Win64 Command Prompt
image


2. POCO :
cd C:/poco/poco-1.4.6p4-wince-SAIO_CE60_SDK_R16

3. SDK. :
wm6.bat

4. POCO. :
build_CE_vs90-all.cmd

:
\bin\__sdk
\lib\__sdk
:
\bin\SAIO_CE60_SDK_R16 (ARMV4I)
\lib\SAIO_CE60_SDK_R16 (ARMV4I)


"POCO C++ Libraries GNU Make Build System" pocoproject.org/docs/99150-GMakeBuildNotes.html
"Building On Windows" pocoproject.org/docs/00200-GettingStarted.html

***

++ . , !

.

Source: https://habr.com/ru/post/223157/


All Articles