[英]include botan 2 in compilation
i try include some botan header in compilation process我尝试在编译过程中包含一些植物 header
#include <botan/rng.h>
#include <botan/auto_rng.h>
#include <botan/cipher_mode.h>
#include <botan/hex.h>
#include <iostream>
int main(int argc, char** argv)
{
return 0;
}
I found that i need to compile with following command in order to build successfully我发现我需要使用以下命令编译才能成功构建
g++ app.cpp -I/usr/local/include/botan-2
i saw some folks execute我看到有些人执行
g++ app.cpp -lbotan-2
i tried it out but i get a error我试过了,但我得到了一个错误
'app.cpp:1:10: fatal error: botan/rng.h: No such file or directory
#include <botan/rng.h>
Am i missing anything?我错过了什么吗?
The following command:以下命令:
g++ app.cpp -lbotan-2
links botan-2 with app.cpp
but you still need to specify where to find the headers:将 botan-2 与
app.cpp
链接,但您仍然需要指定在哪里可以找到标头:
g++ app.cpp -I/usr/local/include/botan-2 -lbotan-2
Under my system, the headers for botan-2 are in /usr/include/botan-2
.在我的系统下, botan-2 的标头位于
/usr/include/botan-2
中。 So, make sure you are giving the right path.因此,请确保您提供了正确的路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.