如何在 Windows 上安装犰狳? [英] How can I install Armadillo on Windows?

查看:24
本文介绍了如何在 Windows 上安装犰狳?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I need to install and use Armadillo library to deal with linear algebra.

I went to their websites and downloaded .tar.xz file, but I have no idea how to install it.

How can I install Armadillo? (I'm primarily using Dev-C++, but I also sometimes use XCode)

解决方案

If you are using Windows, you might be using Visual Studio for compilation. Extract tarball using 7zip or other extraction software and save it in the directory of your choice. For example your path could be, C:armadillo.

In the Visual Studio solution, do the following:

  • Add armadillo directory under Property Manager --> C/C++ --> General --> Additional Include Directories, add semicolon after existing entries, followed by C:armadilloinclude;%(AdditionalIncludeDirectories)

If you are using 64-bit version to build also do the following:

  • Property Manager --> Linker --> General --> Additional Library Directories, add semicolon after existing entries, followed by C:armadilloexampleslib_win64;%(AdditionalLibraryDirectories)
  • Property Manager --> Linker --> Input --> Additional Dependencies, add semicolon after existing entries, followed by blas_win64_MT.lib;lapack_win64_MT.lib;%(AdditionalDependencies)

Ensure that you are modifying the Property Manager in the same Solution Configuration and Solution Platform that you are using for the build. If this was successful, you should be able to use armadillo by simply adding #include <armadillo> in your header file.

这篇关于如何在 Windows 上安装犰狳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆