[Ipopt] After compiling Ipopt with Cygwin "make test" fails
Stefan Vigerske
stefan at math.hu-berlin.de
Fri Jun 26 15:43:53 EDT 2009
Hi,
I have no experience with the matlab interface.
The error you see probably comes from an inclusion of windows.h somewhere.
windows.h just defines "short" (very very dumb), and that often makes
problems.
Somewhere behind an "#include <windows.h>" should be an '#undef short"
included.
Stefan
Johannes Vonk wrote:
> Hello,
> Thanks Stefan! Okay I am ignoring it. but then I get another error. I am
> following the instructions on this page "
> https://projects.coin-or.org/Ipopt/wiki/MatlabInterface". In Step 4 I
> modified the file "Makefile" and after typing "make install" I get the
> following error:
>
> $ make install
> g++ -O3 -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit
> -Wparent
> heses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
> -Wconversi
> on -Wno-unknown-pragmas -DMATLAB_MEXFILE
> -I/home/Johannes/CoinIpopt/include/c
> oin -IC:/Program\ Files/MATLAB/R2007a/extern/include \
> -o matlabfunctionhandle.o -c matlabfunctionhandle.cpp
> In file included from C:/Program
> Files/MATLAB/R2007a/extern/include/mex.h:127,
> from matlabfunctionhandle.hpp:12,
> from matlabfunctionhandle.cpp:9:
> C:/Program Files/MATLAB/R2007a/extern/include/stdio.h:11: error:
> redeclaration o
> f C++ built-in type `short'
> make: *** [matlabfunctionhandle.o] Error 1
>
> It's the first time I am working with Cygwin and Ipopt and I don't know much
> about it. I hope you can help :)
>
> Thanks,
> Johannes
>
> 2009/6/26 Stefan Vigerske <stefan at math.hu-berlin.de>
>
>> Hi,
>>
>> I can reproduce this on cygwin with gcc 4.3.2
>>
>>> gcc -O3 -fomit-frame-pointer -pipe -DNDEBUG -Wimplicit -Wparentheses
>>> -Wsequence-
>>> point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas -o hs071_c.exe
>>> hs071_
>>> c.o ../src/Interfaces/.libs/libipopt.a
>> -L/usr/lib/gcc/i686-pc-cygwin/3.4.4
>>> -L/u
>>> sr/lib/gcc/i686-pc-cygwin/3.4.4/../../.. -lfrtbegin
>>> /usr/lib/gcc/i686-pc-cygwin/
>>> 3.4.4/libg2c.a /usr/lib/gcc/i686-pc-cygwin/3.4.4/libstdc++.a
>>> -L/managed/gcc-buil
>>> d/final-v3-bootstrap/gcc-3.4.4-999/.build/i686-pc-cygwin/libstdc++-v3/src
>>> -L/man
>>>
>> aged/gcc-build/final-v3-bootstrap/gcc-3.4.4-999/.build/i686-pc-cygwin/libstdc++-
>>> v3/src/.libs
>>> -L/managed/gcc-build/final-v3-bootstrap/gcc-3.4.4-999/.build/gcc -L
>>> /usr/i686-pc-cygwin/bin -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32
>>> -lgcc
>>> -ldl
>> The problem seem to be the -lcygwin here. When I link hs071_c.exe
>> without the -lcygwin, then it works fine.
>> I don't know how it get in there, I extra compiled with
>> --enable-doscompile, but gfortran seem to tell configure that it wants
>> to have it.
>>
>> So I guess you can just ignore this failure, and when you like your own
>> application with the Ipopt lib, don't link against cygwin.
>>
>> Stefan
>>
>> --
>> Stefan Vigerske
>> Humboldt University Berlin, Numerical Mathematics
>> http://www.math.hu-berlin.de/~stefan
>>
>
--
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan
More information about the Ipopt
mailing list