VS2015 + Halcon17 + MFC configuration (win10 system)

This article is reproduced documents from Dr. Tao, I wish Dr. Tao as soon as possible to find a girlfriend

  • Foreword

VS and Halcon configuration can be roughly refer to my other blog post https://blog.csdn.net/jgj123321/article/details/94636112 , the article introduces another slightly different configuration method. Imagine, if you do not have a project to put computers running Halcon, then the link above configuration methods will lead to the collapse of the project. By making Halcon development kits, and can be configured as a relative path solve the above problems, the specific process is as follows:

  • Production Halcon Development Kit

  1. Create a new folder named Halcon17X64, on behalf of the 64-bit version 17 Halcon library. In this folder create two subfolders, named bin, lib
  2. Halcon below the root directory, and Help folder include folders, Halcon17x64 copied to the folder.
  3. Halcon root directory of the lib folder and bin folders following the removal of a portion of the file, packaged in our Halcon17x64 folder corresponding subfolders.   

    Require the removal of the lib file has: halcon.lib, halconc.lib, halconcpp.lib.

    removal of bin files need to have:.. halcon.dll, halconc dll, halconcpp dll.

    Note that version to be unified, we have to build generating 64-bit exe, we need to do a 64-bit development kit, the removal of all 64 of the corresponding file.

  • Development environment configuration

  1. Create a new MFC application [], in the project directory under the packed Halcon17x64 folder (the project file .vcxproj the same level directory for the project directory)
  2. As we Halcon Development Kit is a 64-bit, so to attribute to the target platform X64
  3. Menu bar, click [Project] - [Properties] - [Configuration Properties] - [VC ++ directory] - [] Enter the directory that contains the following two paths: Halcon12x64 \ include; Halcon12x64 \ include \ halconcpp
  4. Menu bar, click [Project] - [Properties] - [Configuration Properties] - [VC ++ directory] - [database] directory, enter the following path: Halcon12x64 \ lib
  5. Menu bar, click [Project] - [Properties] - [Configuration Properties] - [Linker] - [Enter] enter the following:                                                     

    halcon.lib; halconc.lib; halconcpp.lib;     

  6. Open stdafx.h header file, add Halcon header file and namespace: #include "HalconCpp.h"
    a using namespace HalconCpp;
  • Halcon test whether the configuration

Read and display a picture, after running if the interfacial fleeting, may be related to the application Halcon dll not found

Solution one: Halcon related dll on exe directory

Solution two: Halcon set environment variables (ie, the path bin folder)

 

 

Guess you like

Origin blog.csdn.net/jgj123321/article/details/94717121