网上很多方法都失败了,或者即使配置好了,也会有各种各样的问题,那是因为armadillo的版本太低了。经过三天不眠不休,终于搞定,教程在此!
首先下载我的aemadillo安装包。这个安装包是不同的,非常好的版本。
其次在CMakeList下面写上类似的话:
INCLUDE_DIRECTORIES(“C:/Users/haoge/Desktop/armadillo-10.1.2/include”)
link_directories(“C:/Users/haoge/Desktop/armadillo-10.1.2/examples/lib_win64”)
link_libraries(
“C:/Users/haoge/Desktop/armadillo-10.1.2/examples/lib_win64/libopenblas.lib”
)
add_executable(untitled4 main.cpp)
target_link_libraries(untitled4 PUBLIC libopenblas.lib)
还有一个隐藏的问题需要解决,打开设置->构建执行部署->amd64,需要注意这个必须是64位的,不管是vs还是mingw或者其他调试器,都需要注意这个必须是6位的。
然后测试:
#include
#include
using