README 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. This is the README file for the POCO C++ Libraries.
  2. In this document you will find a brief description of the directory layout,
  3. as well as a description necessary steps to build the POCO C++ Libraries.
  4. The Foundation library contains a platform abstraction layer (including classes
  5. for multithreading, file system access, logging, etc.), as well as
  6. a large number of useful utility classes, such various stream buffer and stream
  7. classes, URI handling, and many more.
  8. The XML library contains an XML parser with SAX2 and DOM interfaces,
  9. as well as an XMLWriter.
  10. The Util library contains classes for working with configuration files and
  11. command line arguments, as well as various utility classes.
  12. The Net library contains network classes (sockets, HTTP client/server, etc.).
  13. All libraries come with a test suite and a number of sample programs.
  14. The basic directory layout is as follows:
  15. build/ the build system for Unix/OpenVMS and additional utility scripts
  16. config/ build configurations for various Unix platforms
  17. rules/ common build rules for all platforms
  18. scripts/ build and utility scripts
  19. vms/ OpenVMS build system scripts
  20. vxconfig/ VxWorks build configurations
  21. bin/ all executables (dynamic link libraries on Windows)
  22. bin64/ all 64-bit executables (and DLLs)
  23. doc/ additional documentation
  24. lib/ all libraries (import libraries on Windows)
  25. lib64/ all 64-bit libraries
  26. CppUnit/ project and make/build files for the CppUnit unit testing framework
  27. doc/ additional documentation
  28. include/
  29. CppUnit/ header files for CppUnit
  30. src/ source files for CppUnit
  31. WinTestRunner/ Windows GUI for CppUnit
  32. Foundation/ project and make/build files for the Foundation library
  33. include/
  34. Poco/ header files for the Foundation library
  35. src/ source files for the Foundation library
  36. testsuite/ project and make/build files for the Foundation testsuite
  37. src/ source files for the Foundation testsuite
  38. bin/ test suite executables
  39. samples/ sample applications for the Foundation library
  40. XML/ project and make/build files for the XML library
  41. include/
  42. Poco/
  43. XML/ header files for the core XML library
  44. SAX/ header files for SAX support
  45. DOM/ header files for DOM support
  46. src/ source files for the XML library
  47. testsuite/ project and make/build files for the XML testsuite
  48. src/ source files for the XML testsuite
  49. bin/ test suite executables
  50. samples/ sample applications for the XML library
  51. Net/ project and make/build files for the Net library
  52. include/
  53. Poco/
  54. Net/ header files for the Net library
  55. src/ source files for the Net library
  56. testsuite/ project and make/build files for the Net testsuite
  57. src/ source files for the Net testsuite
  58. bin/ test suite executables
  59. samples/ sample applications for the Net library
  60. Depending on what package you have downloaded, there may be other libraries
  61. as well (such as Data, Crypto, NetSSL_OpenSSL and Zip).
  62. DOCUMENTATION
  63. =============
  64. Plenty of documentation (tutorial slides, articles and SDK reference)
  65. is available at <http://pocoproject.org/documentation/>.
  66. EXTERNAL DEPENDENCIES
  67. =====================
  68. The following libraries require third-party software (header files and
  69. libraries) being installed to build properly:
  70. - NetSSL_OpenSSL and Crypt require OpenSSL.
  71. - Data/ODBC requires ODBC
  72. (Microsoft ODBC on Windows, unixODBC or iODBC on Unix/Linux)
  73. - Data/MySQL requires the MySQL client.
  74. Most Unix/Linux systems already have OpenSSL preinstalled. If your system
  75. does not have OpenSSL, please get it from http://www.openssl.org or
  76. another source. You do not have to build OpenSSL yourself - a binary
  77. distribution is fine (e.g., apt-get install openssl libssl-dev).
  78. The easiest way to install OpenSSL on Windows is to use a binary
  79. (prebuild) release, for example the one from Shining Light
  80. Productions that comes with a Windows installer
  81. (http://www.slproweb.com/products/Win32OpenSSL.html).
  82. Depending on where you have installed the OpenSSL libraries,
  83. you might have to edit the build script (buildwin.cmd), or add the
  84. necessary paths to the INCLUDE and LIB environment variables.
  85. The Data library requires ODBC support on your system if you want
  86. to build the ODBC connector (which is the default). On Windows
  87. platforms, ODBC should be readily available if you have the
  88. Windows SDK. On Unix/Linux platforms, you can use iODBC
  89. (preinstalled on Mac OS X) or unixODBC. For the MySQL connector,
  90. the MySQL client libraries and header files are required.
  91. The Data/ODBC and Data/MySQL Makefiles will search for the ODBC
  92. and MySQL headers and libraries in various places. Nevertheless,
  93. the Makefiles may not be able to find the headers and libraries.
  94. In this case, please edit the Makefile in Data/ODBC and/or Data/MySQL
  95. accordingly.
  96. BUILDING ON WINDOWS
  97. ===================
  98. Microsoft Visual Studio 7.1 (2003), 8.0 (2005), 9.0 (2008) or 10.0 (2010) is required to
  99. build the POCO C++ Libraries on Windows platforms. Solution and project files for all
  100. versions are included. For Visual Studio 2008 and 2010, 64-bit (x64) builds are
  101. supported as well.
  102. You can either build from within Visual Studio (Build->Batch Build->Select All;Rebuild)
  103. or from the command line. To build from the command line, start the
  104. Visual Studio .NET 2003 (or 2005/2008/2010) Command Prompt and cd to the directory where you
  105. have extracted the POCO C++ Libraries sources. Then, simply start the buildwin.cmd script
  106. and pass as argument the version of visual studio (71, 80, 90 or 100). You can customize
  107. what is being built by buildwin.cmd by passing appropriate command line arguments to
  108. it. Call buildwin.cmd without arguments to see what is available.
  109. To disable certain components (e.g., NetSSL_OpenSSL or Data/MySQL) from the build,
  110. edit the file named "components" and remove the respective lines.
  111. Certain libraries, like NetSSL_OpenSSL, Crypto or Data/MySQL have dependencies
  112. to other libraries. Since the build script does not know where to find the necessary
  113. header files and import libraries, you have to either add the header file paths to
  114. the INCLUDE environment variable and the library path to the LIB environment variable,
  115. or you'll have to edit the buildwin.cmd script, where these environment variables can
  116. be set as well.
  117. In order to run the test suite and the samples, the top-most bin directory containing
  118. the shared libraries must be in the PATH environment variable.
  119. IMPORTANT NOTE: Please make sure that the path to the directory containing the
  120. POCO C++ Libraries source tree does not contain spaces. Otherwise, the Microsoft
  121. message compiler may fail when building the Foundation library.
  122. BUILDING FOR WINDOWS CE
  123. Building for Windows CE is supported with Microsoft Visual Studio 2008.
  124. Unless you have the Digi JumpStart Windows CE 6.0 SDK installed, you'll
  125. have to modify the included Visual Studio project and solution files.
  126. Please see the SDK Reference Documentation (http://pocoproject.org/documentation)
  127. for instructions.
  128. BUILDING ON UNIX/LINUX/MAC OS X
  129. ===============================
  130. For building on Unix platforms, the POCO C++ Libraries come with their own
  131. build system. The build system is based on GNU Make 3.80 (or newer), with the help
  132. from a few shell scripts. If you do not have GNU Make 3.80 (or later) installed on
  133. your machine, you will need to download it from
  134. http://directory.fsf.org/devel/build/make.html>,
  135. build and install it prior to building the POCO C++ Libraries.
  136. You can check the version of GNU Make installed on your system with
  137. > gmake --version
  138. or
  139. > make --version
  140. Once you have GNU Make up and running, the rest is quite simple.
  141. To extract the sources and build all libraries, testsuites and samples, simply
  142. > gunzip poco-X.Y.tar.gz
  143. > tar -xf poco-X.Y.tar
  144. > cd poco-X.Y
  145. > ./configure
  146. > gmake -s
  147. See the configure script source for a list of possible options.
  148. For starters, we recommend --no-tests and --no-samples, to reduce build times.
  149. On a multicore or multiprocessor machine, use parallel makes to speed up
  150. the build (make -j4).
  151. Once you have successfully built POCO, you can install it
  152. to /usr/local (or another directory specified as parameter
  153. to configure --prefix=<path>):
  154. > sudo gmake -s install
  155. You can omit certain components from the build. For example, you might
  156. want to omit Data/ODBC or Data/MySQL if you do not have the corresponding
  157. third-party libraries (iodbc or unixodbc, mysqlclient) installed
  158. on your system. To do this, use the --omit argument to configure:
  159. > ./configure --omit=Data/ODBC,Data/MySQL
  160. To build on Mac OS X 10.3 with GCC 3, do the following:
  161. (NOTE: This only affects 10.3; for 10.4/10.5 see above)
  162. > ./configure --config=Darwin7
  163. > make -s
  164. IMPORTANT: Make sure that the path to the build directory does not
  165. contain symbolic links. Furthermore, on Mac OS X (or other systems
  166. with case insensitive filesystems), make sure that the characters in
  167. the path have the correct case. Otherwise you'll get an error saying
  168. "Current working directory not under $PROJECT_BASE.".
  169. BUILDING ON QNX NEUTRINO
  170. ========================
  171. For QNX Neutrino, the Unix build system (see the instructions above) is used.
  172. You can use the build system to cross-compile for a target platform on a Solaris or
  173. Linux host. Unfortunately, the Cygwin-based Windows host environment has some major
  174. quirks that prevent the build system from working there. You can also use the
  175. build system on a self-hosted QNX system. The default build configuration for QNX
  176. (found in build/config/QNX) is for a self-hosted x86 platform. To specify another
  177. target, edit the CCVER setting in the build configuration file. For example, to
  178. compile for a PowerPC target, specify CCVER=3.3.1,gcc_ntoppcbe.
  179. Service Pack 1 for QNX Neutrino 6.3 must be installed, otherwise compiling the
  180. Foundation library will fail due to a problem with the <list> header in the
  181. default (Dinkumware) C++ standard library.
  182. When building on QNX, you might want to disable NetSSL_OpenSSL, Crypto and
  183. some Data connectors, unless you have the necessary third party components
  184. available:
  185. > ./configure --omit=NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQL
  186. BUILDING FOR VXWORKS
  187. ====================
  188. Please see the VxWorks Platform Notes in the Reference Documentation for
  189. more information. The Reference Documentation can be found online
  190. at <http://pocoproject.org/docs/>.
  191. BUILDING ON OPENVMS
  192. ===================
  193. OpenVMS is no longer supported in recent versions of POCO, due to both a
  194. lack of interest and a lack of contributors. The following
  195. instructions are here for historical reasons.
  196. The POCO C++ Libraries come with their own build system for OpenVMS, implemented
  197. by a bunch of DCL scripts. The scripts can be found in the build/vms directory.
  198. To build the POCO C++ Libraries on OpenVMS, follow the following steps.
  199. 1) Download the .zip distribution of the POCO C++ Libraries
  200. 2) Unzip the archive
  201. $ unzip -aa poco-0_91_4.zip
  202. 3) Change the directory
  203. $ set def [.poco-0_01_4]
  204. 4) Create a lib directory
  205. $ create/dir [.lib]
  206. 5) Run the buildvms.com script
  207. $ @buildvms
  208. This will build the debug versions of the libraries. To build the release
  209. versions, use
  210. $ @buildvms -release
  211. MORE INFORMATION
  212. ================
  213. For more information, see the POCO C++ Libraries website
  214. at <http://pocoproject.org>.
  215. --
  216. $Id: //poco/1.4/dist/README#4 $