龙空技术网

msys mingw64编译poco

KIN在路上 143

前言:

如今大家对“aix系统apache编译好的补丁”大致比较着重,各位老铁们都想要知道一些“aix系统apache编译好的补丁”的相关知识。那么小编同时在网摘上网罗了一些有关“aix系统apache编译好的补丁””的相关资讯,希望你们能喜欢,看官们快快来学习一下吧!

1、下载和安装msys2、安装编译工具链pacman -S mingw32/mingw-w64-i686-gccpacman -S mingw32/mingw-w64-i686-gdbpacman -S mingw32/mingw-w64-i686-makepacman -S mingw32/mingw-w64-i686-cmakepacman -S mingw64/mingw-w64-x86_64-gccpacman -S mingw64/mingw-w64-x86_64-gdbpacman -S mingw64/mingw-w64-x86_64-makepacman -S mingw64/mingw-w64-x86_64-cmakepacman -S msys/gccpacman -S msys/gdbpacman -S msys/makepacman -S msys/cmake3、编译源码 (以poco-poco-1.9.0-release.tar.gz为例子)1)双击mingw64.exe进入shell2)  tar -xzvf poco-poco-1.9.0-release.tar.gz3)cd poco-poco-1.9.0-release4) ./configure --minimal --config=MinGW --no-tests --no-samples --shared --static5) make6) make install4、编译帮助./configure --helpusage: 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                    Darwin-clang                  MinGW-CrossEnvAlpine                 Darwin-clang-libc++           NIOS2-LinuxAndroid                DigiEL                        OpenPandoraAngstrom               ELDK                          OSF1AppleTV                FreeBSD                       PPC-LinuxAppleTVSimulator       FreeBSD-Linux-compat          QNXARM-Linux              GCCEMBEDLINUX                 SH-LinuxBeagleBoard            HP-UX                         SmartOS-gccCEGCCARM               iPhone                        SSV-LINUXCygLinux               iPhone-clang                  SunOSCYGWIN                 iPhone-clang-libc++           SunOS-GCCDarwin                 iPhoneSimulator               SunOS-stdcxx-x86_64Darwin32               iPhoneSimulator-clang         SunOS-SunForteDarwin32-clang         iPhoneSimulator-clang-libc++  SunOS-SunStudioDarwin32-clang-libc++  Linux                         SunOS-SunStudio11Darwin64               Linux-clang                   WatchOSDarwin64-clang         Linux-SolarisStudio           WatchSimulatorDarwin64-clang-libc++  MinGW                         Yocto  --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 /home/chenkaibin/local-build/poco-install/poco-poco-1.9.0-release/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.5、上面编译成功6、使用上面的链接库可能会发现的问题我自己的项目是cmake项目,一般会cmake -G "MinGW Makefiles" ..然后自己mingw32-make,结果总是出现以下问题,不知道什么鬼undefined reference to `_imp___ZN4Poco17RandomInputStreamC1Ev'undefined reference to `_imp___ZN4Poco12BinaryReaderC1ERSiNS0_15StreamByteOrderE'undefined reference to `_imp___ZN4Poco12BinaryReaderrsERm'undefined reference to `_imp___ZN4Poco12BinaryReaderD1Ev'undefined reference to `_imp___ZN4Poco17RandomInputStreamD1Ev'undefined reference to `_imp___ZN4Poco12BinaryReaderD1Ev'undefined reference to `_imp___ZN4Poco17RandomInputStreamD1Evundefined reference to `__imp__ZN4Poco11Environment6osNameB5cxx11Ev'undefined reference to `__imp__ZN4Poco11Environment13osDisplayNameB5cxx11Ev'undefined reference to `__imp__ZN4Poco11Environment14osArchitectureB5cxx11Ev'undefined reference to `__imp__ZN4Poco11Environment9osVersionB5cxx11Ev'undefined reference to `__imp__ZN4Poco11Environment6isUnixEv'undefined reference to `__imp__ZN4Poco11Environment9isWindowsEv'是我自己编译的库有问题么,但是明明成功了,静态库都生成了,没办法我把自己编译的给删除了,然后用命令安装了poco,不过不是最新的版本pacman -S mingw64/mingw-w64-x86_64-poco编译自己的项目还是后失败,总是上面类似的问题,实在没办法,我用g++编译,竟然通过了g++ main.cpp -o test -lPocoFoundation -lPocoNet7、猜想原因1)是不是cmake项目都要用cmake来编译?2)查找了资料说mingw编译的静态库有问题?3)我自己用cmake编译以下试一试,结果又出现了下面问题-- The C compiler identification is GNU 9.2.0-- The CXX compiler identification is GNU 9.2.0-- Check for working C compiler: C:/CKBSetup/msys64/mingw64/bin/gcc.exe-- Check for working C compiler: C:/CKBSetup/msys64/mingw64/bin/gcc.exe -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Detecting C compile features-- Detecting C compile features - done-- Check for working CXX compiler: C:/CKBSetup/msys64/mingw64/bin/g++.exe-- Check for working CXX compiler: C:/CKBSetup/msys64/mingw64/bin/g++.exe -- works-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done-- Detecting CXX compile features-- Detecting CXX compile features - done-- Poco package version: 1.9.0-- Checking for C++11 compiler-- Checking for C++11 compiler - available-- Checking for C++14 compiler-- Checking for C++14 compiler - available-- Setting Poco build type - RelWithDebInfoCMake Error at cmake/PocoMacros.cmake:33 (message):  message compiler not found: required to buildCall Stack (most recent call first):  CMakeLists.txt:86 (include)-- Configuring incomplete, errors occurred!See also "C:/CKBSetup/msys64/home/chenkaibin/poco-install/poco-poco-1.9.0-release/cmake-build/CMakeFiles/CMakeOutput.log".算了,不搞了,太费劲了,今天不搞了,期待大神搞定

标签: #aix系统apache编译好的补丁