我正在尝试使用OpenWRT工具链交叉编译用于OpenWRT Linux环境的POCO源代码包。我已经下载了POCO源代码包,并试图交叉编译它,但是我得到的错误日志如下所示
src/Error.cpp: In static member function 'static std::string
Poco::Error::getMessage(int)': src/Error.cpp:71:55: error: invalid
conversion from 'int' to 'const char*' [-fpermissive]
return
root@OpenWrt:~/poco-1.8.1-all# ./configure --no-tests --no-samples --omit=CppUnit,Data,MongoDB,PageCompiler,Redis,Zip
root@OpenWrt:~/poco-1.8.1-all# make
In file included from include/Poco/Crypto/CipherKeyImpl.h:22:0,
from include/Poco/Crypto/CipherKey.h:22,
from sr
我已经成功地用MinGW64 (MSYS2)编译了POCO库。为了构建它,我安装了Windows并将mc.exe的路径添加到PATH环境中,所以我执行了以下操作:
pacman -S mingw-w64-x86_64-cmake
# Get POCO
git clone -b master https://github.com/pocoproject/poco.git
# set Windows SDK to the PATH
export PATH="/c/Program Files (x86)/Windows Kits/10/bin/10.0.18362.0/x64:$PATH
我试图在Ubuntu上使用g++ 5.4.0创建一个共享库。
我已经构建了Poco C++库的静态库(C++文件),我想静态地将它们链接到我的共享库中。
但这是行不通的。
我在构建脚本中添加了以下字符串:
-Wl,-whole-archive -lPocoFoundation -Wl,-no-whole-archive
g++发出以下错误消息:
relocation R_X86_64_32S against '-ZTVN4Poco15ArchiveStrategyE' can not be used when making a shared object; recompile
我在Poco库中找到了一个PocoConfig.cmake,我在/cmake/Modules下复制了它
我还在我的CMakeLists.txt中添加了:
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
现在我运行/构建/cmake ..
我不断地得到:
CMake Error at CMakeLists.txt:41 (find_package):
By not providing "FindPoco.cmake" in CMAKE_MODULE
我正在尝试使用Poco::Path:: current ()获取C++程序的当前工作目录。当我以正常方式或“以管理员身份运行”运行程序时,它工作正常,并给出了正确的路径。但是这个问题发生在使用"Run using“运行程序的时候。该函数将返回"C:\WINDOWS\system32“,而不是工作目录。我试图找到解决方案,但到目前为止还没有针对Poco库的解决方案。我在here上发现了类似的问题,但它使用的是GetModuleFileName,它只适用于Windows。我需要将程序部署在不同的操作系统中,如linux和Poco库。有没有其他方法可以在运行程序时使用Poco库获得
我正在尝试在项目中使用Poco库,在为C++构建时遇到了一些问题。 我使用柯南C++包管理器作为基础,但我将Poco源代码包含在项目中,并将其子目录包含在项目的顶层CMakeLists.txt中,以使该过程更加透明。 如果我用不依赖于OpenSSL的Poco库构建项目,它构建得很好。如果我添加Poco的NetSSL,那么我会得到一些与math.h相关的问题: In file included from /home/uname/storage/projects/-some-project-/thirdparty/poco/Crypto/src/Cipher.cpp:15:
In file in
我试着用Makefile来做我的项目。Makefile对其他Mac的工作正常,但在我的情况下会带来错误。
产出如下:
CC kernel.cpp
In file included from kernel.cpp:13:
In file included from ./kernel.hpp:22:
In file included from /usr/local/include/Poco/JSON/Object.h:24:
In file included from /usr/local/include/Poco/JSON/Array.h:25:
In file included from /