如何在Windows上安装Armadillo? [英] How can I install Armadillo on Windows?
问题描述
我需要安装并使用 Armadillo
库来处理线性代数。
I need to install and use Armadillo
library to deal with linear algebra.
我去了他们的网站并下载了 .tar.xz
文件,但我不知道如何安装它。
I went to their websites and downloaded .tar.xz
file, but I have no idea how to install it.
如何安装 Armadillo
? (我主要使用 Dev-C ++
,但我有时也使用 XCode
)
How can I install Armadillo
? (I'm primarily using Dev-C++
, but I also sometimes use XCode
)
推荐答案
如果您使用的是Windows,则可能正在使用Visual Studio进行编译。使用7zip或其他提取软件提取tarball并将其保存在您选择的目录中。例如,您的路径可以是 C:\armadillo
。
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
.
在Visual Studio解决方案中,执行以下操作:
In the Visual Studio solution, do the following:
- 在
Property Manager - >下添加armadillo目录C / C ++ - >一般 - >其他包含目录
,在现有条目后添加分号,然后按C:\armadillo \ include;%(AdditionalIncludeDirectories)
- Add armadillo directory under
Property Manager --> C/C++ --> General --> Additional Include Directories
, add semicolon after existing entries, followed byC:\armadillo\include;%(AdditionalIncludeDirectories)
如果您使用的是64位版本,请执行以下操作:
If you are using 64-bit version to build also do the following:
-
物业经理 - >链接器 - >一般 - >其他库目录
,在现有条目之后添加分号,然后是C:\armadillo \ examples \ lib_win64;%(AdditionalLibraryDirectories)
-
物业经理 - >链接器 - >输入 - >附加依赖项
,在现有条目后添加分号,然后是blas_win64_MT.lib; lapack_win64_MT.lib;%(AdditionalDependencies)
Property Manager --> Linker --> General --> Additional Library Directories
, add semicolon after existing entries, followed byC:\armadillo\examples\lib_win64;%(AdditionalLibraryDirectories)
Property Manager --> Linker --> Input --> Additional Dependencies
, add semicolon after existing entries, followed byblas_win64_MT.lib;lapack_win64_MT.lib;%(AdditionalDependencies)
确保您在相同的解决方案配置中修改
Property Manager
您用于构建的code>和解决方案平台
。如果成功,您只需在头文件中添加 #include< armadillo>
即可使用armadillo。
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上安装Armadillo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!