Ask Your Question

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 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

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:
  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


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: 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


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

Seen: 959 times

Last updated: Nov 09 '12