Visual Studio 配置 Halcon C++ 运行环境
2023-06-13 09:14:43 时间
Halcon 代码经常需要融入 VS 的环境中运行,本文记录在 VS C++ 代码中运行 Halcon 的环境配置。
安装 Halcon
- 首先需要 安装好 Halcon
- 此时环境变量中应该有
HALCONARCH
,HALCONEXAMPLES
,HALCONIMAGES
,HALCONROOT
VS 环境配置
在 VS 中运行 Halcon 代码最关键需要解决的就是环境配置问题
- 我们按照一个官方示例中描述的内容配置 Halcon 环境
- 在 VS 中新建空的 C++ 工程
- 选择 X64 平台
include
- 在项目属性中加入两个
附加包含目录
:
链接器
- 在
附加库目录
中添加 Halcon lib 的地址
附加依赖项
中加入两个 lib 文件:
- 至此完成了在 VS C++ 中 Halcon 环境的配置,可以运行 Halcon 的代码了。
示例代码
- 新建
main.cpp
源文件
#include "HalconCpp.h"
int main()
{
HalconCpp::HImage Image("printer_chip/printer_chip_01");
}
- 可以正常编译运行即表示 Halcon 已经在 VS 中正常工作了
参考资料
相关文章
- C++学习——c++逗号操作符说明(附加全部运算符优先级)
- Visual Studio 2017安装教程
- pip 安装 torch 报错Microsoft Visual C++ Redistributable is not installed
- C++构造函数的作用_c++什么是构造函数
- Visual Studio (VS2017)提交代码到Git服务器流程(GitCode)
- Visual C++ 微软常用运行库合集_2022.09.15
- C++stl库_c++库
- c++界面开发工具_visual c++界面设计教程
- C++字符串加密_c++字符串连接函数
- Visual Studio中C++关于Unicode字符集和多字节字符集
- Visual Studio Code window环境下快捷键大全
- c++的链表-链表入门(C++)
- Visual Studio Code Jupyter Notebook RCE
- 基于腾讯云CVM如何搭建visual-chatgpt的环境
- 【C++ 语言】Visual Studio 配置 FFMPEG 开发环境 ( VS2019 CMake 环境安装 | 下载 FFMPEG 开发包 | 配置 FFMPEG )
- 【OpenGL】三、Visual Studio 2019 配置 GitHub ( 将项目上传到 GitHub )
- 【OpenGL】六、Visual Studio 2019 配置 GitHub ( 提取和拉取简介 | 拉取远程代码 )
- 【Visual Studio】Visual Studio 2019 创建 Windows 控制台程序 ( 安装 ‘使用 C++ 的桌面开发‘ 组件 | 创建并运行 Windows 控制台程序 )
- 【Java 虚拟机原理】垃圾回收算法( Java VisualVM 工具 | 安装 Visual GC 插件 | 使用 Java VisualVM 分析 GC 内存 )
- 【Android 逆向】Android 进程注入工具开发 ( Visual Studio 开发 Android NDK 应用 | 使用 Makefile 构建 Android 平台 NDK 应用 )
- 【错误记录】Visual Studio 中编译 NDK 报错 ( no matching function for call to ‘cacheflush‘ cacheflush(); )
- 【错误记录】Visual Studio 中编译 NDK 报错 ( error : cannot use ‘throw‘ with exceptions disabled )
- 【错误记录】安装 Visual Studio 2013 中文语言包报错 ( 需要 Microsoft Visual Studio Test Agent , 但此计算机上并为安装它 )
- c++基础篇之C++ 模板
- Exploring the Architecture of MongoDB: A Visual Guide(mongodb架构图)
- 微软 Visual Studio Code 已支持 GitHub Classroom 扩展
- VisualC#.Net网络程序开发-Socket篇
- VisualC++中MFC消息的分类
- 深入分析VisualC++进行串口通信编程的详解