[Ipopt] FW: IPOPT MATLAB Interface Linking Porblem
Ge, Ming
ming.ge08 at imperial.ac.uk
Wed Apr 11 07:08:22 EDT 2012
Hello Everyone:
I am a new starter of IPOPT and Linux system, I am trying to install IPOPT into my Ubuntu system but I got some problems in the final step: Linking IPOPT with MATLAB interface.
The Linux system I am using is Ubuntu 10.04 x64, MATLAB version is 2011a x64, GCC version is 4.3.4 and IPOPT 3.9.3
I followed the standard installation guide, ran and passed the initial "configure", "make", "make test" and "make install", and finally after I modified the "Makefile" by filling in the MATLAB installation folder:
MATLAB_HOME = /usr/local/MATLAB/R2011a
And
MEXSUFFIX = mexa64
I ran the command "sudo make install" it gave the following error:
g++-4.3 -O3 -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread -DMATLAB_MEXFILE `PKG_CONFIG_PATH=/home/ming/Documents/Ipopt-3.9.3/build/lib/pkgconfig: /usr/bin/pkg-config --cflags ipopt` -I/usr/local/MATLAB/R2011a /extern/include \
-o matlabexception.o -c ../../../../../Ipopt/contrib/MatlabInterface/src/matlabexception.cpp
g++-4.3: /extern/include: No such file or directory
make: *** [matlabexception.o] Error 1
And produce only one file: matlabexception.o
The "configure" command I tried at the beginning are:
sudo ../configure CXX=g++-4.3 CC=gcc-4.3 F77=gfortran-4.3 ADD_CXXFLAGS="-fPIC -fexceptions" ADD_CFLAGS="-fPIC -fexceptions" ADD_FFLAGS="-fPIC -fexceptions"
sudo ../configure CXX=g++-4.3 CC=gcc-4.3 F77=gfortran-4.3 ADD_CXXFLAGS=" -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread" ADD_CFLAGS="-ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread" ADD_FFLAGS=" -fexceptions -fbackslash -fPIC -fno-omit-frame-pointer"
When I run the command "mex -v" in my MATLAB it gives:
-> mexopts.sh sourced from directory (DIR = $HOME/.matlab/$REL_VERSION)
FILE = /home/ming/.matlab/R2011a/mexopts.sh
----------------------------------------------------------------
-> MATLAB = /usr/local/MATLAB/R2011a
-> CC = gcc
-> CC flags:
CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2011a/bin/glnxa64 -L/usr/local/MATLAB/R2011a/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
arguments = -DMX_COMPAT_32
-> CXX = g++
-> CXX flags:
CXXFLAGS = -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
CXXDEBUGFLAGS = -g
CXXOPTIMFLAGS = -O -DNDEBUG
CXXLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2011a/bin/glnxa64 -L/usr/local/MATLAB/R2011a/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
-> FC = gfortran
-> FC flags:
FFLAGS = -fexceptions -fbackslash -fPIC -fno-omit-frame-pointer
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O
FLIBS = -Wl,-rpath-link,/usr/local/MATLAB/R2011a/bin/glnxa64 -L/usr/local/MATLAB/R2011a/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
-> LD = gcc
-> Link flags:
LDFLAGS = -pthread -shared -Wl,--version-script,/usr/local/MATLAB/R2011a/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
LDEXTENSION = .mexa64
arguments =
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments =
----------------------------------------------------------------
mex: no file name given.
Usage:
MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
[objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]
Use the -help option for more information, or consult the MATLAB External Interfaces Guide.
??? Error using ==> mex at 208
I hope the information below can help you guys making suggestions. Any help is appreciated.
Best Regards
Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20120411/71ff842a/attachment-0001.html>
More information about the Ipopt
mailing list