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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:23:05+00:00 2026-06-12T04:23:05+00:00

I am trying to compile a mex library using MATLAB under Ubuntu. I fet

  • 0

I am trying to compile a mex library using MATLAB under Ubuntu. I fet the following error even I try to compile with -fpermissive (i.e. mex -v CXXFLAGS='$CFLAGS -fpermissive' Coarse2FineTwoFrames.cpp GaussianPyramid.cpp OpticalFlow.cpp, what must I do? Is there a problem in the library code?

    In file included from Image.h:11:0,
                     from Coarse2FineTwoFrames.cpp:3:
    Stochastic.h:11:13: warning: extra tokens at end of #ifndef directive [enabled by default]
    In file included from OpticalFlow.h:4:0,
                     from Coarse2FineTwoFrames.cpp:4:
    NoiseModel.h:6:0: warning: "PI" redefined [enabled by default]
    Stochastic.h:16:0: note: this is the location of the previous definition
    In file included from Image.h:6:0,
                     from Coarse2FineTwoFrames.cpp:3:
    ImageProcessing.h: In static member function ‘static void ImageProcessing::BilinearInterpolate(const T1*, int, int, int, double, double, T2*)’:
    ImageProcessing.h:133:23: warning: there are no arguments to ‘__min’ that depend on a template parameter, so a declaration of ‘__min’ must be available [-fpermissive]
    ImageProcessing.h:134:23: warning: there are no arguments to ‘__min’ that depend on a template parameter, so a declaration of ‘__min’ must be available [-fpermissive]
    ImageProcessing.h: In static member function ‘static T1 ImageProcessing::BilinearInterpolate(const T1*, int, int, double, double)’:
    ImageProcessing.h:155:23: warning: there are no arguments to ‘__min’ that depend on a template parameter, so a declaration of ‘__min’ must be available [-fpermissive]
    ImageProcessing.h:156:23: warning: there are no arguments to ‘__min’ that depend on a template parameter, so a declaration of ‘__min’ must be available [-fpermissive]
    ImageProcessing.h: In static member function ‘static void ImageProcessing::BilinearInterpolate_transpose(const T1*, int, int, int, double, double, T2*)’:
    ImageProcessing.h:182:23: warning: there are no arguments to ‘__min’ that depend on a template parameter, so a declaration of ‘__min’ must be available [-fpermissive]
    ImageProcessing.h:183:23: warning: there are no arguments to ‘__min’ that depend on a template parameter, so a declaration of ‘__min’ must be available [-fpermissive]
    In file included from Image.h:11:0,
                     from Coarse2FineTwoFrames.cpp:3:
    Stochastic.h: In static member function ‘static void CStochastic::GaussianFiltering(T1*, T2*, int, int, int, double)’:
    Stochastic.h:402:32: warning: there are no arguments to ‘__min’ that depend on a template parameter, so a declaration of ‘__min’ must be available [-fpermissive]
    In file included from Coarse2FineTwoFrames.cpp:3:0:
    Image.h: In member function ‘virtual bool Image<T>::loadImage(std::ifstream&)’:
    Image.h:846:26: warning: there are no arguments to ‘strcmpi’ that depend on a template parameter, so a declaration of ‘strcmpi’ must be available [-fpermissive]
    Image.h:848:26: warning: there are no arguments to ‘strcmpi’ that depend on a template parameter, so a declaration of ‘strcmpi’ must be available [-fpermissive]
    Image.h:850:34: warning: there are no arguments to ‘strcmpi’ that depend on a template parameter, so a declaration of ‘strcmpi’ must be available [-fpermissive]
    Image.h: In member function ‘void Image<T>::imfilter_hv(Image<T1>&, const Image<double>&, const Image<double>&) const’:
    Image.h:1328:54: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:1329:54: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h: In member function ‘void Image<T>::imfilter_hv_transpose(Image<T1>&, const Image<double>&, const Image<double>&) const’:
    Image.h:1417:54: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:1418:54: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h: In member function ‘void Image<T>::warpImageBicubic(Image<T>&, const Image<T1>&, const Image<T1>&, const Image<T1>&, const Image<T2>&, const Image<T2>&) const’:
    Image.h:2277:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2278:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2279:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2280:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h: In member function ‘void Image<T>::warpImageBicubic(Image<T>&, const Image<T1>&, const Image<T2>&, const Image<T2>&) const’:
    Image.h:2339:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2340:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2341:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2342:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h: In member function ‘void Image<T>::warpImageBicubicCoeff(Image<T1>&) const’:
    Image.h:2439:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2440:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2441:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2442:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h: In member function ‘void Image<T>::warpImageBicubicRef(const Image<T>&, Image<T>&, const Image<T1>&, const Image<T1>&, const Image<T1>&, const Image<T2>&, const Image<T2>&) const’:
    Image.h:2536:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2537:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2538:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2539:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h: In member function ‘void Image<T>::warpImageBicubicRef(const Image<T>&, Image<T>&, const Image<T1>&, const Image<T2>&, const Image<T2>&) const’:
    Image.h:2606:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2607:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2608:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h:2609:25: warning: there are no arguments to ‘__max’ that depend on a template parameter, so a declaration of ‘__max’ must be available [-fpermissive]
    Image.h: In member function ‘bool Image<T>::loadImage(std::ifstream&) [with T = double, std::ifstream = std::basic_ifstream<char>]’:
    Coarse2FineTwoFrames.cpp:102:1:   instantiated from here
    Image.h:846:2: error: ‘strcmpi’ was not declared in this scope
    Image.h:848:2: error: ‘strcmpi’ was not declared in this scope
    Image.h:850:2: error: ‘strcmpi’ was not declared in this scope
    In file included from Image.h:6:0,
                     from Coarse2FineTwoFrames.cpp:3:
    ImageProcessing.h: In static member function ‘static void ImageProcessing::BilinearInterpolate(const T1*, int, int, int, double, double, T2*) [with T1 = double, T2 = double]’:
    ImageProcessing.h:218:4:   instantiated from ‘static void ImageProcessing::ResizeImage(const T1*, T2*, int, int, int, double) [with T1 = double, T2 = double]’
    Image.h:719:2:   instantiated from ‘bool Image<T>::imresize(double) [with T = double]’
    Coarse2FineTwoFrames.cpp:102:1:   instantiated from here
    ImageProcessing.h:133:2: error: ‘__min’ was not declared in this scope
    ImageProcessing.h:133:2: error: ‘__max’ was not declared in this scope
    In file included from Image.h:6:0,
                     from Coarse2FineTwoFrames.cpp:3:
    ImageProcessing.h: In static member function ‘static T ImageProcessing::EnforceRange(const T&, const int&) [with T = int]’:
    ImageProcessing.h:139:4:   instantiated from ‘static void ImageProcessing::BilinearInterpolate(const T1*, int, int, int, double, double, T2*) [with T1 = double, T2 = double]’
    ImageProcessing.h:218:4:   instantiated from ‘static void ImageProcessing::ResizeImage(const T1*, T2*, int, int, int, double) [with T1 = double, T2 = double]’
    Image.h:719:2:   instantiated from ‘bool Image<T>::imresize(double) [with T = double]’
    Coarse2FineTwoFrames.cpp:102:1:   instantiated from here
    ImageProcessing.h:23:98: error: ‘__max’ was not declared in this scope
    ImageProcessing.h:23:98: error: ‘__min’ was not declared in this scope

        mex: compile of ' "Coarse2FineTwoFrames.cpp"' failed.
  • 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-12T04:23:06+00:00Added an answer on June 12, 2026 at 4:23 am

    According to your error message. strcmpi is not defined.

    From a very quick google search, you can see that it is define in string.h.

    So try to add #include <string.h> at the beginning of image.h.

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

Sidebar

Related Questions

I am trying to write C++ programs and integrate it with MATLAB using mex
Iam trying to compile rtmpd using VS2008 Iam getting this error. Error 63 error
When trying to compile the following: #include <string> #include <iterator> #include <iostream> using namespace
I am trying to compile a basic c++ .mex and .oct file using the
When trying to compile with Xcode, I am getting the following error: Undefined symbols
When trying to compile a feature detection algorithm I get the following compile error:
Trying to compile a iPhone/iPad application with SDK3.2 and am getting this error: Undefined
When trying to compile this code: #include <iostream> #include <vector> using namespace std; class
When trying to compile GNU software on HP-UX (binutils for example) I'm getting error
While trying to compile a 64 bit linux kernel using gcc, I see the

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.