[Ipopt] jipotpt.cpp compilation fails - Ipopt-3.11.9
Kirk Abbott
kabbott at newleafpower.com
Sun Dec 21 11:59:26 EST 2014
Stefan and Tony,
The suggested change works. Thanks much.
In addition, under Mingw g++, the cpp name mangling prevents the
functions found being found.
The following change to the contrib/JavaInterface/Makefile should do the
trick. The "-Wl,--add-stdcall-alias" would need to be added to Makefile.in
LINKFLAGS = $(CXXFLAGS) -shared -Wl,--add-stdcall-alias
Cheers,
Kirk
On 12/19/2014 8:19 AM, Stefan Vigerske wrote:
> Hi,
>
> it should probably be
> jint* tmp = new jint[num_nonlin_vars];
>
> Does that work?
>
> Stefan
>
> On 12/18/2014 11:16 PM, Kirk Abbott wrote:
>> Hello,
>>
>> I have been trying to build from source the jipopt.dll using
>> Ipopt-3.11.9
>>
>> I am compiling under *Mingw *(see below)
>> $ uname -a
>> MINGW32_NT-6.2 ABBOTTK6 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys
>>
>> The build of the main Ipopt tree works. But when I try to compile the
>> stuff in contrib/JavaInterface, I get the following error:
>>
>> jipopt.cpp: In member function 'virtual bool
>> Jipopt::get_list_of_nonlinear_variables(Ipopt::Index, Ipopt::Index*)':
>> jipopt.cpp:537:48: error: invalid conversion from 'int*' to 'jint* {aka
>> long int*}' [-fpermissive]
>> jint* tmp = new int[num_nonlin_vars];
>> ^
>> make: *** [jipopt.lo] Error 1
>>
>> Any ideas on how to correct this?
>>
>> BTW, is there another forum that I should be directing these
>> questions to?
>>
>> Thanks,
>> Kirk
>>
>>
>>
>>
>> _______________________________________________
>> Ipopt mailing list
>> Ipopt at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/ipopt
>>
>
More information about the Ipopt
mailing list