【发布时间】:2019-10-18 18:22:22
【问题描述】:
尝试构建 Botan 可执行文件,我收到以下错误:
../src/cli/timing_tests.cpp: In static member function 'static Botan::RandomNumberGenerator& Botan_CLI::Timing_Test::timing_test_rng()':
../src/cli/timing_tests.cpp:100:17:错误:“AutoSeded_RNG”没有命名类型 静态 AutoSeeded_RNG static_timing_test_rng(Botan::Entropy_Sources::global_sources(), 0); ^~~~~~~~~~~~~~ ../src/cli/timing_tests.cpp:101:17:错误:“static_timing_test_rng”未在此范围内声明 返回 static_timing_test_rng; ^~~~~~~~~~~~~~~~~~~~~~ ../src/cli/timing_tests.cpp:101:17:注意:建议的替代方案:'timing_test_rng' 返回 static_timing_test_rng; ^~~~~~~~~~~~~~~~~~~~~~ 计时测试rng make: *** [Makefile:606: build/obj/cli/timing_tests.o] 错误 1
这是 C++ 代码:
static Botan::RandomNumberGenerator& timing_test_rng()
{
#if defined(BOTAN_HAS_SYSTEM_RNG)
return Botan::system_rng();
#elif defined(BOTAN_HAS_AUTO_SEEDING_RNG)
static AutoSeeded_RNG static_timing_test_rng(Botan::Entropy_Sources::global_sources(), 0);
return static_timing_test_rng;
#else
// we could just use SHA-256 in OFB mode for these purposes
throw CLI_Error("Timing tests require a PRNG");
#endif
}
我正在使用这些设置: configure.py --prefix=$BUILD_DIR --with-external-includedir=$OPENSSL_PREFIX/include --with-external-libdir=$OPENSSL_PREFIX/lib --os=mingw --cpu=i386 --minimized-build -- enable-modules=rsa,dsa,ecdsa,ed25519,hmac,hmac_drbg,mode_pad,bigint,filters,block,auto_rng,x509,cbc,dh --with-openssl
(在 Windows 10 中使用 mingw32 构建。Botan 版本 2.11.0)
我对此很陌生。有什么想法吗?
编辑:更改为 2.10.0 版本,因为 2.11.0 尚未正式发布,但错误现在确实更改为:
undefined reference to 'Botan::CPUID::state()'
【问题讨论】:
标签: c++11 dll static-libraries mingw32 botan