[Ipopt] problem of interfacing IPOPT with matlab

Peter Carbonetto pcarbo at cs.ubc.ca
Sun Jun 1 14:28:21 EDT 2008


> I am working on windows XP, and using cygwin as the unix envirenment. and
> matlab version is 7.6R2008a
> things are working properly until when I ran make all the new error show up
> $ make all
> g++ -O3 -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit
> -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith
> -Wwrite-strings -Wconversion -fPIC -fexceptions  -DMATLAB_MEXFILE
> -DMWINDEXISINT -IC:/msys/1.0/home/MPC/Ipopt/Ipopt/install1/include

The problem is that you've included the flag -DMWINDEXISINT. You shouldn't 
have included it, as explained in the Matlab interface installation 
instructions.

Peter Carbonetto
Ph.D. Candidate
Dept. of Computer Science
University of British Columbia


> -IC:/msys/1.0/home/MPC/Ipopt/Ipopt/install1/include2 -o sparsematrix.o -c
> sparsematrix.cpp
> sparsematrix.cpp:1: warning: -fPIC ignored for target (all code is position
> independent)
> In file included from sparsematrix.cpp:9:
> sparsematrix.h:19: error: conflicting declaration 'typedef int mwIndex'
> C:/msys/1.0/home/MPC/Ipopt/Ipopt/install1/include2/tmwtypes.h:802: error:
> 'mwIndex' has a previous declaration as `typedef size_t mwIndex'
> sparsematrix.h:19: error: declaration of `typedef int mwIndex'
> C:/msys/1.0/home/MPC/Ipopt/Ipopt/install1/include2/tmwtypes.h:802: error:
> conflicts with previous declaration `typedef size_t mwIndex'
> sparsematrix.h:19: error: declaration of `typedef int mwIndex'
> C:/msys/1.0/home/MPC/Ipopt/Ipopt/install1/include2/tmwtypes.h:802: error:
> conflicts with previous declaration `typedef size_t mwIndex'
> make: *** [sparsematrix.o] Error 1
>
> it seems that the head files are conflicting with each other. could you help
> me figure that out.
> Thank you very much
>
>
> --
> Thank you very much
>
> Yours
> Yudong Ma
>


More information about the Ipopt mailing list