halcon+qt配置

版本:
halcon10
qt5.9.5 mvs2015
QT pro文件中添加并包含库:

win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhalcon
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhalconc
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhalconcpp
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhalconcppxl
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhalconcxl
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhalconx
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhalconxl
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhalconcxl
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhalconxxl
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhdevenginecpp
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhdevenginecppxl
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhdevenginex
win32: LIBS += -LD:/MVTec/HALCON-10.0/lib/x64-win64/ -lhdevenginexxl

INCLUDEPATH += D:/MVTec/HALCON-10.0/lib/x64-win64
INCLUDEPATH += D:/MVTec/HALCON-10.0/include/cpp
INCLUDEPATH += D:/MVTec/HALCON-10.0/include
DEPENDPATH += D:/MVTec/HALCON-10.0/lib/x64-win64

如果不行,在环境变量-》系统变量中添加halcon的环境变量:

D:/MVTec/HALCON-10.0/lib/x64-win64
D:/MVTec/HALCON-10.0/include/cpp
D:/MVTec/HALCON-10.0/include
D:/MVTec/HALCON-10.0/lib/x64-win64

头文件引用模板:

#include "HalconCpp.h"
using namespace Halcon;

你可能感兴趣的:(QT)