Visual Servoing Platform  version 3.1.0 under development (2017-11-24)
Tutorial: How to import a CMake project that uses ViSP in Eclipse IDE
Note
We assume in this tutorial that you have successfully installed ViSP either with an Installation from prebuild SDK or with an Installation from source.

In this tutorial you will learn how to import a CMake project that uses ViSP into Eclipse IDE.

This tutorial uses CMake to build projects. If you are not familiar with CMake, you can check the tutorial.

Adjust Eclipse settings

1) You need to download Eclipse IDE archive.

2) Extract Eclipse from archive

$ tar -zxvf eclipse-***.tar.gz -C {target directory} (For Linux)

3) Create a CMake project or take the project from Tutorial: How to create and build a CMake project that uses ViSP on Unix or Windows which is used in this tutorial

4) Open Eclipse

img-visp-into-eclipse-4.png

5) File > New > Makefile Project with Existing Code

img-visp-into-eclipse-5.png

6) Browse > Select directory to the CMake project > Press "Finish"

img-visp-into-eclipse-6.png

7) Goto to the Project directory and execute "cmake . " in console in order to Configure your project

img-visp-into-eclipse-7.png

8) Right click on Project > Press "Properties" > C/C++ Build > Builder Settings

  • Make sure that "Build command" contains "make"
  • Make sure that "Build directory" contains path to the folder which contains MakeFile of the project
    img-visp-into-eclipse-8.png

9) Project > Build all

  • Make sure that Project builds
    img-visp-into-eclipse-9.png

10) Right click on Project > Run As > Run Configurations > C/C++ Application > "Project" Default

img-visp-into-eclipse-10.png

11) C/C++ Application > Browse > Browse path to the executable file of your project > Apply

img-visp-into-eclipse-11.png

12) Now run the Project from Eclipse as usual

img-visp-into-eclipse-12.png

Unresolved inclusion

1) If you see issues such as "Unresolved inclusion" You need to perform next steps to solve it

img-visp-into-eclipse-unr-1.png

2) Right click on Project > Press "Properties"

img-visp-into-eclipse-unr-2.png

3) C/C++ General > Preprocessor Include Path etc. > Providers > Enable "CDT GCC Built-in Compiler Settings"

img-visp-into-eclipse-unr-3.png

4) Wait until C++ indexer finished his work

img-visp-into-eclipse-unr-4.png

Program arguments

For some projects you need to specified input arguments

img-visp-into-eclipse-arg-1.png

Right click on Project > Run As > Run Configurations > C/C++ Application > "Project" Default > Arguments

  • Write arguments to "Program arguments"
    img-visp-into-eclipse-arg-2.png

Next tutorial

You are now ready to see the Tutorial: How to display an image