Skip to content

Generating DLL

Utkarsh Tripathi edited this page Sep 27, 2018 · 4 revisions

Software requirements:

  • Before building solution for application, your computer should have ViSP and some other third party libraries (like OpenCV) installed that may be used in the project. Detailed download and installation tutorials are available on the ViSP main page.
  • Visual Studio (2015 Community Edition used in our case) should be installed for building the solution and creating dynamic linked library (DLL).
  • Unity Engine (2017.4.1 used in our case)

Using CMake to generate solution File:

Here, we explain how to generate DLLs for your Unity project using the code available here. You will notice .cpp, .h and CMakeLists.txt are present in the folder.

  • Open CMake and fill in the paths for source code and build folder. An example image is shown below:

  • Press "Configure" button, and select your compiler/generator. In our case we will use Visual Studio 14 2015 Win64. Press "Finish" button and configuration will start.

  • After this, you may have to edit the path (VISP_DIR), as shown below. Click "Configure" to remove red lines and "Generate" to generate solution file.

  • You will notice the solution present in the 'build' folder:

Using Visual Studio to generate DLL:

  • Open the project in VS by opening the .sln file generated in the build folder.
  • Switch to Release from Debug (default)
  • Build the solution by clicking on "Build Solution" in Build menu. There might be some errors: for example header files not found. In that case, you need to explicitly include the directories that contain the required header files. For example: Check this image.

  • Building solution should now generate the required dll file (as shown below) that is to be pasted in the 'Assets' folder in the Unity Project.

Unity Demo

After this, you may run the project in Unity. Some important steps are given in the next document: Running Project in Unity Engine

You can’t perform that action at this time.