在Cygwin上编译restclient cpp不会构建共享库
Compilation of restclient-cpp on Cygwin does not build shared libraries
我正试图在cygwin上使用restclient cpp;然而,当我尝试编译和安装库时,我得到以下消息:
libtool: warning: undefined symbols not allowed in x86_64-unknown-cygwin shared
libraries; building static only
事实上,我的程序一直编译到ld试图链接可执行文件的时候,一系列错误实际上都在说:
undefined reference to `RestClient::post(std::string const&, std::string const&,
std::string const&)'
relocation truncated to fit: R_X86_64_PC32 against undefined symbol `RestClient::post(
std::string const&, std::string const&, std::string const&)'
collect2: error: ld returned 1 exit status
对此有什么可能的解决方案吗?
我使用GCC 6.1.0、libtool 2.4.6 在cygwin上编译
编辑:已在上提交Github问题https://github.com/mrtazz/restclient-cpp/issues/55也许《图书馆》的作者会有答案的。
假设库中的所有符号都可用,您需要添加相关的Makefile.am将标志-no-undefined
转换为正确的your_lib_la_LDFLAGS
关于-no-undefined
,请参阅libtool的手册
相关文章:
- 为 Python 构建共享库C++时出现分段错误
- 如何在 Linux 中构建共享库时使未定义引用的链接器失败
- 从单个.cpp构建共享对象
- 从静态库构建共享库
- 使用 Makefile 构建共享库
- 我可以在Embarcadero C 建造者中为Android(*.so)构建共享库
- setuptools:从C++代码构建共享库,然后构建链接到共享库的 Cython 包装器
- 构建共享对象 - 使用 Ninja 编译适用于 OSX 和 Windows 上的 Ubuntu Crush
- 使用boost :: python手动构建共享对象
- JNI 使用静态 NTL 库构建共享库
- Libtool 在构建共享库时会丢弃静态库
- 使用 C/C++ 以外的语言构建共享库,特别是 prolog
- Eclipse,构建共享库的最佳方式
- OSX Scons构建共享库:体系结构x86_64的未定义符号
- Android NDK构建共享库-中止-停止.local_module_filename不能包含文件扩展名
- 构建共享的帕尔梅蒂斯-4.0.3
- 在linux中使用另一个共享库构建共享库
- 确定用于在*ix操作系统上构建共享对象的编译器和版本
- 未能使用boost 1.48构建共享库
- Qt保持构建共享构建无论我选择什么选项