Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Including external libraries
Including external libraries [message #209871] Sat, 16 February 2008 13:49 Go to next message
Eclipse UserFriend
Originally posted by: carlon.luca.email.it

Hi! Sorry for this trivial problem, but I can't seem to be able to solve.
I followed the manual and I added an external library. I added in the
project properties the path the the libraries and to the related include
files. In the project directory I got the header opencv/cv.h in the
include directory, as I expected. After I build anyway, I get this in the
console window:

make all
g++ -O2 -g -Wall -fmessage-length=0 -c -o Prova.o Prova.cpp
Prova.cpp:11:23: error: opencv/cv.h: No such file or directory
make: *** [Prova.o] Error 1

I can't see any -l parameter. What did I do wrong? Am I missing something?
In my source code I wrote:

#include <opencv/cv.h>

With an old version of CDT I had no problem in doing this, but I did it in
a different way. Am I lacking something to add this library?
Thanks! And sorry for the trivial question but even reading old posts I
couldn't find what is my mistake.
Re: Including external libraries [message #209887 is a reply to message #209871] Sat, 16 February 2008 17:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jim.marshall.wbemsolutions.com

Luca Carlon wrote:
> Hi! Sorry for this trivial problem, but I can't seem to be able to
> solve. I followed the manual and I added an external library. I added in
> the project properties the path the the libraries and to the related
> include files. In the project directory I got the header opencv/cv.h in
> the include directory, as I expected. After I build anyway, I get this
> in the console window:
>
> make all g++ -O2 -g -Wall -fmessage-length=0 -c -o Prova.o Prova.cpp
> Prova.cpp:11:23: error: opencv/cv.h: No such file or directory
> make: *** [Prova.o] Error 1
>
> I can't see any -l parameter. What did I do wrong? Am I missing something?
> In my source code I wrote:
>
> #include <opencv/cv.h>
>
> With an old version of CDT I had no problem in doing this, but I did it
> in a different way. Am I lacking something to add this library?
> Thanks! And sorry for the trivial question but even reading old posts I
> couldn't find what is my mistake.
>
The error message is saying that the compiler can not find the header
file (not a library). You need to ensure that your include path (the -I
option) has the top level directory (e.g. if your structure is like
this, myProgs/include/opencv then you need to specify myProgs/include in
the include path).

hth
Re: Including external libraries [message #209909 is a reply to message #209887] Sun, 17 February 2008 03:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: carlon.luca.email.it

Yes, sorry. I mean that I added both my headers and my libraries. This is
what I have in my include paths (in the project properties):

/opt/local/include

and in fact I have on the filesystem:

/opt/local/include/opencv/cv.h

I can't understand why cv.h cannot be found. Is this ok?
Re: Including external libraries [message #209930 is a reply to message #209909] Mon, 18 February 2008 12:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: carlon.luca.email.it

I noticed the problem was due to the fact that I didn't tell eclipse to
manage the makefile. I didn't realize it was not managing it. Thanks!
Re: Including external libraries [message #1066079 is a reply to message #209930] Sun, 30 June 2013 02:14 Go to previous message
yang eve is currently offline yang eveFriend
Messages: 1
Registered: June 2013
Junior Member
Luca Carlon wrote:
> Hi! Sorry for this trivial problem, but I can't seem to be able to
> solve. I followed the manual and I added an external library. I added in
> the project properties the path the the libraries and to the related
> include files. In the project directory I got the header opencv/cv.h in
> the include directory, as I expected. After I build anyway, I get this
> in the console window:
>
> make all g++ -O2 -g -Wall -fmessage-length=0 -c -o Prova.o Prova.cpp
> Prova.cpp:11:23: error: opencv/cv.h: No such file or directory
> make: *** [Prova.o] Error 1
>
> I can't see any -l parameter. What did I do wrong? Am I missing something?
> In my source code I wrote:
>
> #include <opencv/cv.h>
>
> With an old version of CDT I had no problem in doing this, but I did it
> in a different way. Am I lacking something to add this library?
> Thanks! And sorry for the trivial question but even reading old posts I
> couldn't find what is my mistake.
>


I also have the same problem above.However,you said "I noticed the problem was due to the fact that I didn't tell eclipse to
manage the makefile. I didn't realize it was not managing it." Could you tell me how to tell eclipse to manage the makefile ??? Waiting for you reply!Thanks!
Previous Topic:CDT loses contact with gdb after a few commands
Next Topic:Eclipse CDT launched from GUI does not read $PATH in .bashrc /.bash_profile / .profile on Mac OS X
Goto Forum:
  


Current Time: Thu Apr 18 08:44:56 GMT 2024

Powered by FUDForum. Page generated in 0.02456 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top