10.1.4.2   Integrating the Project Into Your Own Projects

CMake

Move the exported project into a subdirectory of your CMake project and use it in your application project(s). Assuming the exported library has the name MyLibrary, a minimal CMakeLists.txt file for an executable project named ExportTest using the library look as follows:

  project(ExportTest)
  add_subdirectory(MyLibrary)
  add_executable(ExportTest main.cpp)
  target_link_libraries(ExportTest MyLibrary)

Visual Studio

When linking the generated library project into the user application, both hdevenginecpp.lib and halconcpp.lib (C++), or hdevenginedotnet.dll and halcondotnet.dll (C#) must be added to the project as well. This is, because the HDevEngine symbols are not included in the exported library.