LinuxQuestions.org
Review your favorite Linux distribution.
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 11-30-2012, 06:35 AM   #1
dibyamohanty02
LQ Newbie
 
Registered: Nov 2012
Location: Kolkata,India
Posts: 7

Rep: Reputation: Disabled
Not finding header file


I am trying to run an application using OpenCV-2.4.3. My program has the following inclusions.

#include "cv.h"
#include "highgui.h"
#include "cvaux.h"

All the three header files are in OpenCV-2.4.3/include/opencv directory. But while compiling it's not able to find highgui.h or cvaux.h whereas it can find cv.h. What should I do to make the program run?
 
Old 11-30-2012, 08:49 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,125

Rep: Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491
Examples, using pkgconfig ..

Code:
CFLAGS	= -Wall -pedantic -g $(shell pkg-config --cflags opencv)

Code:
gcc -Wall -g file.c -o <executable> `pkg-config --cflags opencv` `pkg-config --libs opencv`

http://www.flameeyes.eu/autotools-my...k_modules.html

http://www.linuxquestions.org/questi...kefile-873185/

.

Last edited by knudfl; 11-30-2012 at 08:55 AM.
 
Old 11-30-2012, 09:39 AM   #3
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by knudfl View Post
Examples, using pkgconfig ..

Code:
CFLAGS	= -Wall -pedantic -g $(shell pkg-config --cflags opencv)

Code:
gcc -Wall -g file.c -o <executable> `pkg-config --cflags opencv` `pkg-config --libs opencv`

http://www.flameeyes.eu/autotools-my...k_modules.html

http://www.linuxquestions.org/questi...kefile-873185/

.

Well, yes and no:

1) not every library has .pc ('pkg-config') files;
2) 'pkg-config' itself needs PKG_CONFIG environment variable to be set properly.
 
Old 11-30-2012, 12:12 PM   #4
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,433

Rep: Reputation: 203Reputation: 203Reputation: 203
how about?

export CFLAGS= -I OpenCV-2.4.3/include/opencv

I assume you are using make
 
1 members found this post helpful.
  


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
[SOLVED] Writting a C++ program using Netbeans and keep getting error about finding my header cuthbertmd1 Programming 2 02-14-2011 07:43 AM
How to check missing header files included from another header file adisan82 Linux - Software 1 01-28-2011 04:57 AM
I am not finding stringprep.h header file naveenisback Linux - Newbie 2 06-16-2009 09:18 AM
KDE 3.5.1 Konstruct has problems finding necessary header files JcN Linux - Newbie 2 02-06-2006 04:57 PM
./configure not finding header files mikeyt_333 Linux - Software 5 06-30-2004 07:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:06 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration