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

  • Home
  • SEARCH
  • 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 8943693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:50:34+00:00 2026-06-15T11:50:34+00:00

I need a help. Few months ago I make this c++ code in Visual

  • 0

I need a help.
Few months ago I make this c++ code in Visual studio on Windows. I make .exe file from that code and everything work fine just like this. That is simple code for image-processing. Now I trying to do same thing in Eclipse on Linux so that I can put executable file on Linux web server. But I have this error:

In function `main':
main.cpp:(.text.startup+0x317): undefined reference to `cv::inpaint(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, double, int)'
collect2: ld returned 1 exit status
make: *** [inpaint] Error 1

I use OpencCV 2.4.1 library. This is source code:

#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/photo/photo.hpp"
#include <iostream>


using namespace cv;
using namespace std;
Mat img, img0, maska;
int main( int argc, char** argv )
{

...
   }
Mat inpainted;
inpaint(img0, img, inpainted, 2, CV_INPAINT_NS);
char imeobr[256] = "images/img-uploads/finish";
strcat( imeobr, argv[1] );
strcat( imeobr, ".jpg" );
imwrite(imeobr, inpainted);
return 0;
}

I think that is a problem in input source, because is not a fixed name of input images. But, I need dynamically change input source for every user of application.
Please help people. What I can do?

  • 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-06-15T11:50:35+00:00Added an answer on June 15, 2026 at 11:50 am

    Undefined reference error happens when you omit to link a library:

    in the preferences of your project:

    C/C++ Build -> GCC C++ Linker -> Libraries
    

    have you entered libopencv_imgproc library in Libraries(-l)?

    update

    Just for testing, I’ve created my program:

    #include <opencv/highgui.h>
    #include <opencv/cv.h>
    
    using namespace cv;
    
    int main(int argc, char* argv[]) {
      Mat img, img0;
      Mat inpainted;
      inpaint(img0, img, inpainted, 2, CV_INPAINT_NS);
    }
    

    in libraries I’ve linked:

    opencv_imgproc 
    opencv_highgui
    opencv_core
    

    Everything works fine.. Try it and tell me!

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

Sidebar

Related Questions

I hope someone can help me with this. A few months ago I was
Need help writing a script downloads data from google insight using c# this is
I have been running my code for past few months by doing this -
I need help with this Java Program example. This example is from the book
I have been trying out Cassandra and need some help in understanding a few
Need help with a query that I wrote: I have three tables Company id
Thanks to everybody who has helped over the past few months trying to help
In last few months I have been making a transition from Java to Groovy
I have a WordPress installation and a few months ago I decided to change
I do some examples and i need help with one or few errors. I

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.