99200-WinCEPlatformNotes.page 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. POCO C++ Libraries Windows CE Platform Notes
  2. AAAIntroduction
  3. !!!Introduction
  4. Starting with release 1.4.0 the POCO C++ Libraries can be used on
  5. Windows CE 6. Project files for Visual Studio 2008 are provided that
  6. support static and shared debug and release builds.
  7. The port should work for Windows CE 5 as well, however, this has not been tested.
  8. !!!Changing The Target In The Project Files
  9. The project files contain build configurations for the "Digi JumpStart (ARMV4I)"
  10. target. To use another target, the Visual Studio project and solution files
  11. must be changed accordingly. Note that the project files cannot be opened
  12. by Visual Studio unless the target referenced in the project and solution files is available.
  13. To change the project and solution files for your platform, replace
  14. all occurrences of the string "Digi JumpStart (ARMV4I)" with the name
  15. of your platform (e.g. "Windows Mobile 6 Professional SDK (ARMV4I)").
  16. This is best done with a text editor that supports global search/replace
  17. across an entire directory tree (solution and project files are plain text/xml
  18. files, so there's no risk breaking something).
  19. !!!Restrictions
  20. !!Poco::Environment
  21. Windows CE does not support environment variables.
  22. Therefore, Poco::Environment::get() and Poco::Environment::has() only support the
  23. following hardcoded "pseudo" environment variables:
  24. * TEMP
  25. * TMP
  26. * HOMEPATH
  27. * COMPUTERNAME
  28. * OS
  29. * NUMBER_OF_PROCESSORS
  30. * PROCESSOR_ARCHITECTURE
  31. Poco::Environment::set() always throws a Poco::NotImplementedException.
  32. !!Date/Time Support
  33. Some date/time features are implemented with the help of [[http://wcelibcex.sourceforge.net/ WCELIBCEX]].
  34. The library is statically included in the Foundation library to simplify the build process.
  35. However, it is also possible to use WCELIBCEX as a separate library if the Foundation project file is modified accordingly
  36. (by removing or excluding from build the WCELIBCEX folder and modifying the header file search path accordingly).
  37. The following functions from WCELIBCEX are used:
  38. * wceex_time()
  39. * wceex_localtime()
  40. * wceex_mktime()
  41. It should also be possible to use wcecompat instead of WCELIBCEX, as this library provides
  42. similar features. In this case, the calls to the wceex_* functions need to be replaced with
  43. the wcecompat counterparts. The affected files are Random.cpp, LocalDateTime.cpp,
  44. Timezone_WINCE.cpp and ThreadPool.cpp.
  45. To obtain the current date and time with millisecond resolution,
  46. the hack described in <http://community.opennetcf.com/articles/cf/archive/2007/11/20/getting-a-millisecond-resolution-datetime-under-windows-ce.aspx>
  47. is used. This means there will be a one second delay when starting up
  48. the application.
  49. !!Poco::Path
  50. Poco::Path::listRoots() returns the root directory ("\"), as well as all mounted storage devices
  51. (e.g., "\Hard Disk"), even if they are also present in the root directory.
  52. Poco::Path::current() and Poco::Path::home() always return the root directory.
  53. !!Poco::RWLock
  54. In the reader/writer lock implementation for Windows CE, writers always take precedence over readers.
  55. !!Poco::Process
  56. Launching a process with pipes for redirecting input/output is not supported.
  57. !!Poco::Util::ServerApplication
  58. Poco::Util::ServerApplication::waitForTerminationRequest(): CTRL-C does not work to shut down the application as
  59. it's not supported by the Windows CE console. The pkill utility supplied as part of the Util library
  60. samples can be used to terminate a process from the command line.
  61. !!Crypto and NetSSL
  62. Crypto and NetSSL_OpenSSL have not been tested yet. Project files are there, but they might need some adaptions depending on
  63. how OpenSSL has been built for the Windows CE target.
  64. !!Data
  65. Only the SQLite backend is currently supported.
  66. The SQLite engine in Data/SQLite is built without localtime support (SQLITE_OMIT_LOCALTIME) due to localtime_s() not being
  67. available on Windows CE.
  68. !!Raw Sockets in Net
  69. The test cases involving raw sockets will fail unless the testsuite is ran as a privileged (signed) application.
  70. These are RawSocketTest::testEchoIPv4(), RawSocketTest::testSendToReceiveFromIPv4() and ICMPClientTest::testPing().
  71. !!!Build Notes
  72. Optimization settings should be set as follows for release builds
  73. (<*Properties > Configuration Properties > C/C++ > Optimization*>):
  74. * Optimization: Custom
  75. * Inline Function Expansion: Default
  76. * Enable Intrinsic Functions: Yes (/Oi)
  77. * Floating-Point Consistency: Default Consistency
  78. * Favor Size or Speed: Favor Fast Code (/Ot)
  79. * Whole Program Optimization: No
  80. Other settings may or may not produce working programs.
  81. Specifically, setting <*Optimization*> to <*Maximize Speed (/O2)*> will result in failures in the
  82. test suite for Foundation Events due to a compiler optimizer bug.
  83. For shared/DLL builds, the /FORCE:MULTIPLE option is passed to the linker. This is
  84. to avoid a problem with iostream classes and their methods (template instantiations),
  85. which for some unknown reason (possibly bug) will be exported by the Foundation library
  86. (and others) and thus cause multiply defined symbol errors.
  87. The reference system used for testing is a Digi ConnectCore 9P 9360 running Windows CE 6.0.