【发布时间】:2014-01-26 06:46:13
【问题描述】:
我一直试图编译这个测试程序,但没有成功
#include <botan/botan.h>
int main()
{
Botan::LibraryInitializer init;
}
我已经从网站下载了库源。我运行了configure.py,它运行良好。 然后我尝试运行 MinGW-make
这是我得到的错误
c:\Botan-1.11.7>mingw32-make
g++ -m64 -pthread -fPIC -fvisibility=hidden -std=c++11 -D_REENTRANT -fstack-pro
tector -O3 -momit-leaf-frame-pointer -Wall -Wextra -Wstrict-aliasing -Wstrict-ov
erflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wold-s
tyle-cast -Wzero-as-null-pointer-constant -Ibuild\include -c C:\Botan-1.11.7\src
\lib\algo_base\scan_name.cpp -o build\obj\lib\src_lib_algo_base_scan_name.obj
C:\Botan-1.11.7\src\lib\algo_base\scan_name.cpp:1:0: warning: -fPIC ignored for
target (all code is position independent) [enabled by default]
C:\Botan-1.11.7\src\lib\algo_base\scan_name.cpp:1:0: sorry, unimplemented: 64-bi
t mode not compiled in
mingw32-make: *** [build\obj\lib\src_lib_algo_base_scan_name.obj] Error 1
我搜索了 Google 和任何我能找到的可用论坛。我在他们网站的隐藏文件夹中找到了 Windows 的预建库。但是,该软件包包含 lib 和 dll 文件,而不是 MinGW 需要的 .a 文件。我尝试使用创建 .a 文件的程序 LIB2A。我已将此文件添加到我的 code::blocks 链接器选项中。我还包括了包含文件夹。
当我尝试编译时出现此错误。
C:\botan\include\botan\init.h|41|undefined reference to `_imp___ZN5Botan18LibraryInitializer10initializeERKSs'|
它似乎看不到带有函数定义的库,但我不知道从哪里开始。
【问题讨论】:
标签: c++ codeblocks mingw32 botan