‹ Back to Tutorials

Building OpenNN

OpenNN has been written in ANSI C++. As a consequence, you can build the library on any system with little effort. OpenNN includes project files for Qt Creator. If you want to work with another compiler, you need to create a project for it. In this tutorial, you’ll learn how to do that.

Visual Studio

To use OpenNN with Visual Studio, you must create a solution for it. This is quickly done using Cmake. First of all, you can download OpenNN from GitHub or Sourceforge. Then, open a terminal, go to your OpenNN folder, and run the following command.

				
					cmake .
				
			

The necessary files for a Visual Studio solution will be created in the directory.

Please mind the following dependencies:

  • The folder opennn contains the OpenNN source library.
  • The folder eigen contains the Eigen template library, which is used by OpenNN.
  • The folder examples contain several applications where OpenNN is used.
  • The folder tests contain other applications where OpenNN is used.

 

Execute the file opennn.sln and build opennn first, selecting Release as the build type.

Selecting the opennn file.

You can now run the example applications. Each are located in its respective folder and the .exe file in a Release directory.

An MS-DOS console should appear with the results of the corresponding example.

Once you have seen OpenNN work, you can develop your neural network application. To do that, use a blank example.

Once you have seen OpenNN work, you can develop your neural network application. To do that, use a blank example.

Bibliography:

  • Qt Creator Manual
  • CMake Manual
  • Visual C++ Manual