Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 571683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:31:59+00:00 2026-05-13T13:31:59+00:00

I have installed OpenCV C libraries from package management into my Kubuntu 9.10. I

  • 0

I have installed OpenCV C libraries from package management into my Kubuntu 9.10. I wrote a small image modification program that uses those libraries, but I can’t compile it, because every time I try to compile I get the error message that the functions from OpenCV library cannot be found.

Those header files are in folder /usr/include/opencv/ but still the compiler says that functions cannot be found.

I have tried to include them by basic

#include <highgui.h>
#include <cv.h>

commands in netbeans (and I have set netbeans to search header files from that specific directory) and also tried to include them with full path.

#include </usr/include/opencv/highgui.h>
#include </usr/include/opencv/cv.h>

Also I tried to compile my source file in console (with full path includes), but again I got the same error message that the functions from those libraries cannot be found.

Edit:

The error message that I get is

undefined reference to 'function_name'

I get that error for every function that I try to use from that opencv library.

Any idea how to fix that problem?


Edit II:

in case someone else is using netbeans 6.7.1 and has the same problem, here’s the solution copy pasted from another website:

Here I presume that you have succesfully installed the opencv library either manually or via package management.

  1. Open Netbeans then do the following:
    Select Tools -> Options -> C/C++ -> Code Assistance -> add Include Directories
    (For me, /usr/local/include/opencv)
  2. Create new project, then:
    Right click on Project Name -> Properties ->Build -> C/C++ Compiler -> Include Directories
    Include Directories : /usr/local/include/opencv
  3. Right click on Project Name -> Properties -> Build -> linker ->
    Include Directories : /usr/local/include/opencv
    Additional Options : -I/usr/local/include/opencv -L/usr/local/lib -lcxcore -lcv -lhighgui -lcvaux -lml

Then writing program and compile!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:31:59+00:00Added an answer on May 13, 2026 at 1:31 pm

    “undefined reference to” is a linker error. You forgot to link your application against the OpenCV libraries. Make sure you link against cv and highgui (-lcv -lhighgui) or use the pkg-config call that Tobu provided. I’d also second the request for more detailed error messages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed Xperf performance analyzer from Windows SDK and captured a trace as
I have installed pylons based application from egg, so it sits somewhere under /usr/lib/python2.5/site-packages.
I have a strange problem with opencv running on an Ubuntu. I installed OpenCV
I need to install OpenCV on Win32. I do not have it installed currently.
I have installed WAMP and enable some extension. After that i have installed eclipse
I have installed some MSI with GUID (0733556C-37E8-4123-A801-D3E6C5151617). The program registered in the registry:
I have installed CodeRush and ReFactor package but i don't see any changes on
I have installed TortoiseSVN on machine 192.168.1.56, & want to synchronise with it from
I have just installed OpenCV on my Windows 7 machine. As a result, I
I compiled and installed OpenCV (last version from the SVN) on Mac Os X

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.