前言
在《玩转 ArrayFire:02 善其事,利其器》中,我们已经了解到 ArrayFire 在 Windows 系统下的安装及环境配置,而在这一篇中,我们将继续学习 ArrayFire 如何配合 Visual Studio 2019 软件使用,并创建第一个 ArrayFire 程序。
一、将ArrayFire添加到现有解决方案中
- 打开 Visual Studio 2019 ,创建一个新项目->空项目,并命名为“ HelloWorld ”;
- 解决平台方案选择x64,添加源文件新建项“ HelloWorld.cpp”;
![](https://img-blog.csdnimg.cn/20210202170623300.png#pic_center)
- 修改“ HelloWorld ”项目属性:
01 选择路径“项目 -> 属性 -> 配置属性 -> VC++目录 -> 包含目录”:添加 ArrayFire 中 include 路径,即“ $(AF_PATH)/include ”;
![](https://img-blog.csdnimg.cn/20210202171809473.png#pic_center)