LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-06-2009, 11:51 AM   #1
maikki
LQ Newbie
 
Registered: Jan 2009
Location: Slovak Republic
Distribution: Ubuntu 10.4
Posts: 26

Rep: Reputation: 15
OpenCV compilation problem (add directory for including header files)


Hi folks

I try to build a project that needs to have included openCV header files. These files are store in /usr/include/opencv but the problem is that this direcotry is maybe not in my include directive.

sample of my file:

#include "opencv/cvaux.h"

but the cvaux.h has inside directive '#include <cv.h>' and it makes error that this cant be included.

How can I add /usr/include/opencv direcotry to be searched for including like I do when write '#include <iostream>'

help just to add this direcotry to be enabled for #include directive in c++
 
Old 01-06-2009, 12:09 PM   #2
raconteur
Member
 
Registered: Dec 2007
Location: Slightly left of center
Distribution: slackware
Posts: 276
Blog Entries: 2

Rep: Reputation: 44
On the command line for make, add "-I /usr/include/opencv" (no quotes), or add that same string to the CFLAGS or INCLUDES variable in the makefile.
 
Old 01-07-2009, 08:07 AM   #3
maikki
LQ Newbie
 
Registered: Jan 2009
Location: Slovak Republic
Distribution: Ubuntu 10.4
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by raconteur View Post
On the command line for make, add "-I /usr/include/opencv" (no quotes), or add that same string to the CFLAGS or INCLUDES variable in the makefile.

Great, that works. Thakns so much
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
including /usr/include/linux/ header files throwing errors in SLES 10.2 deedhnd Linux - Server 9 08-19-2008 08:08 AM
Including header file using HTML hoho4rd Programming 4 12-05-2006 11:20 AM
Including header files and source files for classes Feenix Programming 8 09-28-2005 10:53 AM
How to write Makefile in 2.6 for including header files in another dir ? ashbalu Programming 0 10-19-2004 03:45 PM
I think I want to add C header files to my KDevelop project? Scrag Programming 3 03-26-2004 05:02 PM


All times are GMT -5. The time now is 11:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration