Crypto ++ Code :: blocks未定义参考问题

Kal*_*sar 2 c++ reference codeblocks undefined crypto++

我正在尝试使用Crypto ++(带有Code :: Blocks)创建一个C ++程序,但始终遇到相同的问题。我正在使用此代码的简化版本:http : //andreyvitdev.blogspot.com/2005/10/crypto-usage-sample.html ,但我无法对其进行编译。

#include "cryptopp/blowfish.h"
#include "cryptopp/osrng.h"

using namespace CryptoPP;

int main (int argc, char** argv) {

    byte key[Blowfish::DEFAULT_KEYLENGTH],
            iv[Blowfish::BLOCKSIZE];

    AutoSeededRandomPool rng (true);
    rng.GenerateBlock(key, sizeof (key));
    rng.GenerateBlock(iv, sizeof (iv));

}
Run Code Online (Sandbox Code Playgroud)

我收到多个错误,开始于:“ C:\ Users \ Utilisateur \ Programming \ C ++ \ CodeBlocks \ Crytp tester \ main.cpp | 13 |未定义对`CryptoPP :: RandomNumberGenerator :: GenerateBlock的引用(未签名char *,未签名int) '”

我想念什么吗?在不同站点上有许多必须导入的库的引用,但是我不知道它们在crypto ++文件夹中的位置:http : //www.cryptopp.com/#download

Bil*_*eal 5

“未定义的引用”是一个链接器错误-您没有构建Crypto ++库,或者没有告诉链接器链接到它。

不过,我不确定它是否将使用MinGW(最常见的带有代码块的编译器)进行构建。Microsoft编译器(以及Visual Studio)是免费的。并且已通过Code :: Blocks和Crypto ++进行了明确的测试。