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 8682021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:39:36+00:00 2026-06-12T21:39:36+00:00

I almost don’t know C++, but I need help to solve project build problem.

  • 0

I almost don’t know C++, but I need help to solve project build problem. When I make project, it gives me error which says that some functions are ambigous. I clearly understand what it’s mean “It means that there are other versions of the function that take different arguments or different numbers of arguments”.But because of my few experience in C++, I don’t know how to solve it. So that’s why I’m asking for help here.

The error which I have is:

C:\opencv-build\modules\java\core.cpp:172:65: error: call of overloaded 'PCACompute(cv::Mat&, cv::Mat&, cv::Mat&, jint&)' is ambiguous
    C:\opencv-build\modules\java\core.cpp:172:65: note: candidates are:
    In file included from c:/opencv-git/modules/java/generator/src/cpp/converters.h:4:0,
                     from C:\opencv-build\modules\java\core.cpp:8:
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:2383:19: note: void cv::PCACompute(cv::InputArray, cv::InputOutputArray, cv::OutputArray, int)
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:2386:19: note: void cv::PCACompute(cv::InputArray, cv::InputOutputArray, cv::OutputArray, double)
    C:\opencv-build\modules\java\core.cpp: In function 'void Java_org_opencv_core_Algorithm_setInt_10(JNIEnv*, jclass, jlong, jstring, jint)':
    C:\opencv-build\modules\java\core.cpp:6219:32: error: call of overloaded 'set(std::string&, jint&)' is ambiguous
    C:\opencv-build\modules\java\core.cpp:6219:32: note: candidates are:
    In file included from c:/opencv-git/modules/java/generator/src/cpp/converters.h:4:0,
                     from C:\opencv-build\modules\java\core.cpp:8:
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:4328:29: note: void cv::Algorithm::set(const string&, int)
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:4329:32: note: void cv::Algorithm::set(const string&, double)
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:4330:30: note: void cv::Algorithm::set(const string&, bool)
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:4331:32: note: void cv::Algorithm::set(const string&, const string&) <near match>
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:4331:32: note:   no known conversion for argument 2 from 'jint {aka long int}' to 'const string& {aka const std::basic_string<char>&}'
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:4332:29: note: void cv::Algorithm::set(const string&, const cv::Mat&) <near match>
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:4332:29: note:   no known conversion for argument 2 from 'jint {aka long int}' to 'const cv::Mat&'
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:4334:35: note: void cv::Algorithm::set(const string&, const cv::Ptr<cv::Algorithm>&) <near match>
    c:/opencv-git/modules/core/include/opencv2/core/core.hpp:4334:35: note:   no known conversion for argument 2 from 'jint {aka long int}' to 'const cv::Ptr<cv::Algorithm>&'

If you need some more information/code, please tell and I’ll update question with it.

  • 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-12T21:39:37+00:00Added an answer on June 12, 2026 at 9:39 pm

    jint is a typedef to long int (see 'jint {aka long int}' in the lower lines). long int is a distinct type from int (even if they have the same representation) so the compiler can’t decide between the overloads taking int and double in that parameter.

    As you appear to be on Windows, int and long int have the same representation (since 64-bit Windows uses a LLP64 data model) so you can:

    • configure the project that contains the definition of jint to use int instead of long int, or
    • add overloads taking long int that forward to the int overload, or
    • cast the jint argument to int everywhere it calls an ambiguous function
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm almost sure it does but I just need to make sure. I don't
Guys, I've got this problem that I searched almost everywhere (maybe I don't know
I don't edit CSS very often, and almost every time I need to go
I almost figured this out, except I don't know how to put the actual
I don't know almost anything about this so if you have some experience let's
I've been searching for almost 2 days, but I still don't manage to do
I don't know what overhead there is in int array lookups. Which would perform
I don't know why I'm having this error. Here is the code where i
I know almost nothing about SVG files, but have to use one in order
Almost all the examples I see are done with IB but I don't want

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.