poco下載地址:https://pocoproject.org/releases/poco-1.7.9/
版本環境:
Qt 版本 5.5.1
poco-1.9.0-all
準備工作:
1. 下載MSYS
使用mingw-get-setup.exe,安裝MYSYS,只選擇安裝msys-base(mingw使用Qt中自帶)
2. 配置
打開C:\MinGW\msys\1.0\msys.bat,在開頭添加
set PATH=D:\Qt\Qt5.5.1\Tools\mingw492_32\bin:$PATH
3. 編譯
1、進入poco的源碼目錄中,執行配置命令
./configure --minimal --config=MinGW --no-tests --no-samples --shared --static --cflags=-std=c99
2、make
編譯完成後的庫在poco中的lib
輸入./configure --help查看參數命令
usage: configure {options}
Configure the POCO C++ Libraries.
Options:
--help
Display this help screen.
--config=<config_name>
Use the given build configuration.
Available configurations are:
AIX Darwin64-clang SH-Linux
ARM-Linux Darwin64-clang-libc++ SSV-LINUX
Alpine DigiEL SmartOS-gcc
Android ELDK SunOS
Angstrom FreeBSD SunOS-GCC
AppleTV FreeBSD-Linux-compat SunOS-SunForte
AppleTVSimulator GCCEMBEDLINUX SunOS-SunStudio
BeagleBoard HP-UX SunOS-SunStudio11
CEGCCARM Linux SunOS-stdcxx-x86_64
CYGWIN Linux-SolarisStudio WatchOS
CygLinux Linux-clang WatchSimulator
Darwin MinGW Yocto
Darwin-clang MinGW-CrossEnv iPhone
Darwin-clang-libc++ NIOS2-Linux iPhone-clang
Darwin32 OSF1 iPhone-clang-libc++
Darwin32-clang OpenPandora iPhoneSimulator
Darwin32-clang-libc++ PPC-Linux iPhoneSimulator-clang
Darwin64 QNX iPhoneSimulator-clang-libc++
--prefix=<install_prefix>
Use the given install directory for make install.
Default is /usr/local.
--no-prefix
Do not use /usr/local as default install directory and do not
define POCO_PREFIX.
--stdcxx-base=<apache_stdcxx_install_prefix>
If (and only if) the /e/3rd/poco-1.9.0-all/poco-1.9.0-all/build/config selected with --config
uses the Apache stdcxx library, then apache_stdcxx_install_prefix
specifies the base directory where stdcxx is installed.
--no-tests
Do not build testsuites.
--no-samples
Do not build samples.
--minimal
Build only Foundation, XML, JSON, Util and Net.
--typical (default)
Build only Foundation, XML, JSON, Util, Net, Crypto, NetSSL, Data/SQLite and Zip.
--everything
Build everything.
--no-wstring
Compile with -DPOCO_NO_WSTRING.
Useful if your C++ compiler does not support std::wstring
(such as uClibc-based systems).
--no-fpenvironment
Compile with -DPOCO_NO_FPENVIRONMENT.
Useful if your C++ compiler has incomplete floating-point support
(such as uClibc-based systems).
--no-sharedmemory
Compile with -DPOCO_NO_SHAREDMEMORY.
For systems that don't support shared memory API's,
like uClibc-based Linux systems.
--no-sharedlibs
Compile with -DPOCO_NO_SHAREDLIBS.
For systems that don't support shared library loading.
--no-ipv6
Compile with -DPOCO_NET_NO_IPv6.
For systems that don't support IPv6.
--sqlite-fts=<path>
Compile with -DPOCO_DATA_SQLITE_FTS.
Compile SQLite with Full Text Search support.
--sqlite-thread-safe=<value>
Compile with -DSQLITE_THREADSAFE=<value>.
Valid values are:
- 0 single-thread, no thread safety
- 1 serial access, highest thread safety
- 2 multi-threaded, without session sharing support
--omit=<component>{,<component>}
Do not build the specified component(s).
Example: --omit=Data/MySQL,Data/ODBC,Zip
--include-path=<path>
Add search path for header files.
--library-path=<path>
Add search path for library files.
--odbc-lib=<path>
Specify the directory where ODBC library is located.
--odbc-include=<path>
Specify the directory where ODBC header files are located.
--cflags=<flags>
Pass additional flags to compiler.
Example: --cflags=-wall
--poquito
Omit a few features for smaller codesize when linking
statically for embedded targets.
--unbundled
Use system-provided zlib, pcre, expat and sqlite instead of
bundled ones.
--static
Build static libraries. Overrides default mode, which
depends upon target. Can be specified together
with --shared to build both.
--shared
Build shared libraries. Overrides default mode, which
depends upon target. Can be specified together
with --static to build both.
相關參考: