我在Ubuntu 15.10的Eclipse(Neon)中有一个C项目。我已经下载了OpenSSL库。为什么在main.c中可以使用C头文件中的函数,但是在编译时未定义错误?
我在预处理指令中包含了openssl/bn.h。在我main.c文件,可以参考我BN_new(),一个功能bn.h:
然而,当我尝试编译,我得到的所有调用一个未定义的引用到bn.h(BN_new(),BN_free()等) 。
作为一个方面说明,我复制的openssl-1.0.2h/include/openssl内容我/usr/include/目录。
为什么这个错误在编译时发生?
我的代码:
#include
#include "jpake.h"
#include
#include
#include
#include
#include
/*
* In the definition, (xa, xb, xc, xd) are Alice's (x1, x2, x3, x4) or
* Bob's (x3, x4, x1, x2). If you see what I mean.
*/
typedef struct
{
char