编译提升::数学的性能测试应用程序
Compiling boost::math's Performance Test Application
是否有人成功编译了boost::math库的性能测试应用程序?链接:http://www.boost.org/doc/libs/1_50_0/libs/math/doc/sf_and_dist/html/math_toolkit/perf/perf_test_app.html
我尝试在目录中运行b2进行编译,但出现了很多错误(超过222000行)。
前几行错误:
../test/erf_data.ipp:6:74: error: wrong number of template arguments (1, should be 2)
In file included from ../../../boost/math/tools/rational.hpp:13:0,
from ../../../boost/math/special_functions/log1p.hpp:18,
from ../../../boost/math/special_functions/gamma.hpp:35,
from test_erf.cpp:9:
../../../boost/array.hpp:60:11: error: provided for ‘template<class T, long unsigned int N> class boost::array’
In file included from test_erf.cpp:13:0:
../test/erf_data.ipp:6:80: error: template argument 1 is invalid
../test/erf_data.ipp:6:91: error: invalid type in declaration before ‘=’ token
../test/erf_data.ipp:7:38: error: ‘SC_’ was not declared in this scope
../test/erf_data.ipp:7:88: error: ‘SC_’ was not declared in this scope
In file included from test_erf.cpp:13:0:
../test/erf_data.ipp:7:136: error: ‘SC_’ was not declared in this scope
好吧,我让它正确地编译和链接,但它不在b2中。我知道OP要求b2,但我不熟悉,所以我提供了一个替代方案。此解决方案假定您已安装Cmake。(很容易做到,只需询问谷歌博士即可。)
如果你去数学考试地点:
~/pathToBoost/libs/math/performance
然后添加一个名为的文件
CMakeLists.txt
内容如下:
cmake_minimum_required(VERSION 2.8)
find_package(Boost COMPONENTS REQUIRED)
include_directories(${DEPENDENCY_DIR}/libboost/lib)
add_executable(main main.cpp test_reference.cpp)
target_link_libraries (main ${Boost_LIBRARIES} boost_regex)
然后创建一个名为build:的文件夹
mkdir build
并构建它。
cd build
cmake ..
make
这样做使我获得了成功的编译和构建。我从中得到一个名为main的程序。
希望这能有所帮助。
相关文章:
- Qt QML桌面应用程序自动化测试
- C++低吞吐量 winsock TCP 测试应用程序
- 如何使用Boost单元测试框架测试Qt应用程序
- 使用C 单元测试框架集成测试Java应用程序
- Linux VM(重型多线程应用程序)的性能改进
- 如何使用Visual Studio Code来调试使用Google Test测试的应用程序?
- 运行最基本的SFML应用程序时的性能
- 在单元测试中测试连接丢失(在节俭的C++应用程序中或一般情况下)
- C++11 监视器类,测试应用程序不想退出
- 使用 ASSERT_DEATH 时,有没有办法在应用程序终止后自动继续执行所有测试
- 测试使用visual studio编写的C++android应用程序的最佳方法是什么.不升级到windows专业版
- 编译提升::数学的性能测试应用程序
- 启动 VirtualBoxSDK 测试应用程序返回错误"Error creating virtual box instance"
- 在Amazon EC2上安装测试应用程序
- 用Python在Qt上编写的自动测试应用程序
- LNK1104.dll链接到 Visual Studio "invalid or corrupt file" 中的测试应用程序时出错
- 无法使用谷歌的protobuf构建测试C++应用程序
- 如何杀死Cocos2d-x测试应用程序
- 简单的线程/互斥测试应用程序崩溃
- 单元测试-如何组织C++测试应用程序和相关文件