sample code in gcc/cmake tutorial does not compile (Bug #2588)


Added by Tim Seeley over 12 years ago. Updated about 12 years ago.


Status:Done Start date:2012-12-01
Priority:Normal Due date:
Assignee:Daniil Osokin % Done:

0%

Category:documentation
Target version:2.4.4
Affected version:branch '2.4' Operating System:
Difficulty: HW Platform:
Pull request:https://github.com/Itseez/opencv/pull/389

Description

Platform: Fedora 17 with OpenCV 2.3.1 packages installed from Fedora's yum repositories.

Tutorial location:
http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html

I'm not sure if this is a general thing, or specific to the way Fedora has set up their packaged OpenCV installation, but the following #includes in the sample code do not compile for me:

#include <cv.h>
#include <highgui.h>

I am an OpenCV newbie, and also not very experienced with C++, so the fix was not immediately obvious to me as is might be to a more experienced C++ programmer. It took me a couple of days to figure out that I should change the #includes to:

#include <opencv2/opencv.hpp>

If this change is generally applicable, perhaps a small edit to the tutorial content would help other newbies. On the other hand, if this is just because of the way Fedora arranges it's installation of OpenCV include files, then ....?

I asked a question in the forum before I figured out the answer. It is at:
http://answers.opencv.org/question/4720/having-trouble-compiling-one-of-the-opencv/


Associated revisions

Revision b5ed86c6
Added by Daniil Osokin about 12 years ago

Fixed sample files in "Using OpenCV with gcc and CMake" tutorial (bug #2663, #2588)

Revision b5755b12
Added by Vadim Pisarevsky almost 11 years ago

Merge pull request #2588 from vpisarev:fix_samples_n_unused

History

Updated by Anna Kogan over 12 years ago

Hello Tim,

Thank you for reporting the problem! If you could fix the issue on your side, a patch or pull request there: http://opencv.org/opencv-pull-requests-test-results.html would be highly appreciated!

Updated by Andrey Kamaev about 12 years ago

  • Affected version set to branch '2.4'
  • Target version deleted ()
  • Assignee deleted (Vsevolod Glumov)

Updated by Daniil Osokin about 12 years ago

Possibly connencted with http://code.opencv.org/issues/2663

Updated by Daniil Osokin about 12 years ago

  • Assignee set to Daniil Osokin

Updated by Daniil Osokin about 12 years ago

Thank you for attention!

  • Status changed from Open to Cancelled

Updated by Daniil Osokin about 12 years ago

  • Pull request set to https://github.com/Itseez/opencv/pull/389
  • Status changed from Cancelled to Open

Updated by Andrey Kamaev about 12 years ago

Fix is pushed to 2.4

  • Status changed from Open to Done

Updated by Kirill Kornyakov about 12 years ago

  • Target version set to 2.4.4

Also available in: Atom PDF