[Ipopt] Static libraries produce a bunch of warnings

Stefan Vigerske stefan at math.hu-berlin.de
Thu Feb 24 05:15:46 EST 2011


Hi,

if you add -Wno-unused-parameter to the compiler flags, most of them 
should go away.
In the COIN-OR build system, -W (== -Wextra) is not set, so you won't 
see them when using the Ipopt makefiles.
The warnings you see do not seem to indicate a bug. There is a way to 
fix them in the code, but it would mean quite some effort.

Stefan

Am 24.02.2011 00:55, schrieb Paul Smith:
> Dear All,
>
> I have compiled Ipopt with the option --enable-static, and when I use
> the Ipopt static libraries to use Ipopt from inside a C++ program, I
> get a bunch of warnings. (Please, find below some of these warnings.)
> Can these warnings be avoided? My code is the one that comes with the
> cpp_example in the Ipopt distribution, and the binary that I get after
> compiling this example works fine.
>
> Thanks in advance,
>
> Paul
>
> -------------------------------------------------
>
> $ make
> g++ -c -pipe -g -Wall -W -D_REENTRANT
> -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include
> -I/home/psmith/ipopt/include/coin
> -I/home/psmith/ipopt/include/coin/ThirdParty -I. -o MyNLP.o MyNLP.cpp
> In file included from /home/psmith/ipopt/include/coin/IpTNLP.hpp:13:0,
>                   from MyNLP.hpp:12,
>                   from MyNLP.cpp:9:
> /home/psmith/ipopt/include/coin/IpReferenced.hpp:205:8: warning:
> unused parameter 'referencer'
> In file included from /home/psmith/ipopt/include/coin/IpTNLP.hpp:13:0,
>                   from MyNLP.hpp:12,
>                   from MyNLP.cpp:9:
> /home/psmith/ipopt/include/coin/IpReferenced.hpp:218:8: warning:
> unused parameter 'referencer'
> In file included from MyNLP.hpp:12:0,
>                   from MyNLP.cpp:9:
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:90:18: warning: unused parameter 'n'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:90:18: warning: unused
> parameter 'var_string_md'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:90:18: warning: unused
> parameter 'var_integer_md'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:90:18: warning: unused
> parameter 'var_numeric_md'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:90:18: warning: unused parameter 'm'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:90:18: warning: unused
> parameter 'con_string_md'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:90:18: warning: unused
> parameter 'con_integer_md'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:90:18: warning: unused
> parameter 'con_numeric_md'
> In file included from MyNLP.hpp:12:0,
>                   from MyNLP.cpp:9:
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:119:18: warning: unused
> parameter 'obj_scaling'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:119:18: warning: unused
> parameter 'use_x_scaling'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:119:18: warning: unused parameter 'n'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:119:18: warning: unused
> parameter 'x_scaling'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:119:18: warning: unused
> parameter 'use_g_scaling'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:119:18: warning: unused parameter 'm'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:119:18: warning: unused
> parameter 'g_scaling'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:132:18: warning: unused parameter 'n'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:132:18: warning: unused
> parameter 'var_types'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:140:18: warning: unused parameter 'm'
> /home/psmith/ipopt/include/coin/IpTNLP.hpp:140:18: warning: unused
> parameter 'const_types'
> In file included from MyNLP.hpp:12:0,
> [...]
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>



More information about the Ipopt mailing list