Saturday, 22 June 2013

OpenCV Tutorial Section 1.8 sample program OK





























Now I have compiled the demo program in Section 1.8 and ran it OK.  Now I know that there are only 3 files required in the DisplayImage directory - CMakeLists.txt  DisplayImage.cpp  TestImage.jpg

Then I execute cmake . and make will get me the target executable file DisplayImage.o

And I ran with the following command.

./DisplayImage TestImage.jpg

Next step is Section 1.9

.END




pi@raspberrypi ~/fongvision/DisplayImage $ ls

CMakeLists.txt  DisplayImage.cpp  TestImage.jpg

pi@raspberrypi ~/fongvision/DisplayImage $ cmake .

-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done

-- Generating done

-- Build files have been written to: /home/pi/fongvision/DisplayImage

pi@raspberrypi ~/fongvision/DisplayImage $ make

Scanning dependencies of target DisplayImage
[100%] Building CXX object CMakeFiles/DisplayImage.dir/DisplayImage.o
Linking CXX executable DisplayImage
[100%] Built target DisplayImage

pi@raspberrypi ~/fongvision/DisplayImage $ ls

CMakeCache.txt  cmake_install.cmake  DisplayImage      Makefile
CMakeFiles      CMakeLists.txt       DisplayImage.cpp  TestImage.jpg

.END



No comments:

Post a Comment