We can now move on to importing our dlls into Unity and writing our wrapper classes to handle interfacing with OpenCV and Unity. That way, we can then create our scripts to build our project:
- Create a folder. I will call mine
ConfigureOpenCV
:

- We need to create a new empty C++ project in Visual Studio. I will call mine
ConfigureOpenCV
, with the location being set in theConfigureOpenCV
folder:

- Set the platform to be
x64
in Visual Studio:

- Right-click on the project properties file and select
Properties
:

- This will open our properties window:


- We need to change the
Configuration Type
fromApplication (.exe)
toDynamic Library (.dll)
:

- Over in
VC++ Directories
, add ourOPENCV_DIRs
to include it inInclude Directories
:

- Over in Linker’s
General
Tab, add$(OPENCV_DIR)\lib\Debug
to theAdditional Library Directories
option:
