![]() |
Visual Servoing Platform version 3.7.0
|
In this tutorial you will learn how to use ViSP without using CMake.
There are two ways to integrate ViSP as a 3rd-party in a Makefile:
$ pkg-config --cflags visp
$ pkg-config --libs visp
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:<visp install tree>/lib/pkgconfig
To build a file named HelloWorld.cpp, both command could be used in a Makefile which content would be the following:
CXX = g++
VISP_CFLAGS = `pkg-config --cflags visp`
VISP_LDFLAGS = `pkg-config --libs visp`
HelloWorld: HelloWorld.cpp
$(CXX) $(VISP_CFLAGS) -o HelloWorld HelloWorld.cpp $(VISP_LDFLAGS)
clean:
rm -f *~ HelloWorld
$ cd $VISP_WS/visp-build $ visp-config --cflags visp
$ visp-config --libs visp
To build a file named HelloWorld.cpp, both command could be used in a Makefile which content would be the following:
CXX = g++
VISP_BUILD_DIR = ${VISP_WS}/visp-build
VISP_CFLAGS = `$(VISP_BUILD_DIR)/bin/visp-config --cflags`
VISP_LDFLAGS = `$(VISP_BUILD_DIR)/bin/visp-config --libs
HelloWorld: HelloWorld.cpp
$(CXX) $(VISP_CFLAGS) -o HelloWorld HelloWorld.cpp $(VISP_LDFLAGS)
clean:
rm -f *~ HelloWorld
You are now ready to see the Tutorial: How to display an image in a window. There is also the Tutorial: How to extend ViSP creating a new contrib module that could be useful to understand how to introduce new developments in ViSP.