Ask Your Question
0

OpenCV on Eclipse CDT for Linux

asked 2012-11-09 06:49:52 -0500

smokindog32 gravatar image

updated 2012-11-09 06:52:34 -0500

http://docs.opencv.org/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html Can anyone help with step 8? I am getting namespace symbol and class "could not be resolved" errors when I try to compile the C++ code snippet in DisplayImage.cpp as shown.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-11-09 12:36:44 -0500

vlattson gravatar image

updated 2012-11-09 12:43:43 -0500

  1. What's the output of following commands:
    echo $PKG_CONFIG_PATH
    echo $LD_LIBRARY_PATH
  2. Are you sure you have set up executable project? (Sorry if it so obvious)
  3. Go to project properties -> Run/Debug settings. Can you see there a launch configuration? Click edit and paste a printscreen of this window.
  4. Go to project properties -> C/C++ Build and click 3rd tab 'Refresh Policy'. Paste print screen of this tab too.

I experienced similar troubles some time ago but I don't remember what exactly was the cause. I will try to find out.

edit flag offensive delete link more

Comments

Hello macbie, I think we have the same problems except that Mr.Smokindog is in Linux. What's the purpose of $PKG_CONFIG_PATH and $LD_LIBRARY_PATH?

Karl gravatar imageKarl ( 2012-11-09 13:44:25 -0500 )edit

@Karl About PKG: http://www.freedesktop.org/wiki/Software/pkg-config So, PKG_CONFIG_PATH is the environment variable with path to pkg binary file. And LD_LIBRARY_PATH is path to directory with openCV libs. On linux you just need to export these two variables to make libraries' location known. Maybe my explanation is not the most accurate, but it's enough for openCV working. I have following paths: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig LD_LIBRARY_PATH=/usr/local/lib

If you will find better information post it here, please. It would be appreciated.

vlattson gravatar imagevlattson ( 2012-11-09 14:15:23 -0500 )edit

I'm a Windows user. Do I need to add that in my system variables?

Karl gravatar imageKarl ( 2012-11-09 15:05:19 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-11-09 06:49:52 -0500

Seen: 959 times

Last updated: Nov 09 '12