help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] glpk and glpk-java


From: Torben Frøberg
Subject: [Help-glpk] glpk and glpk-java
Date: Thu, 26 Nov 2009 08:12:17 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Hi

I am using Ubuntu 9.04 and I have installed the glpk version 4.39. I would like to install the java interface glpk-java version 1.0.6 (http://sourceforge.net/projects/glpk-java/). When trying to compile the package I get the compiler error:



mkdir -p src/java
mkdir -p java/org/gnu/glpk
swig -I/usr/local/include -I/usr/include -java -package org.gnu.glpk -o src/java/glpk_wrap.c -outdir java/org/gnu/glpk glpk.i
libtool --mode=compile gcc -c -fPIC src/java/glpk_wrap.c
libtool: compile: gcc -c -fPIC src/java/glpk_wrap.c -fPIC -DPIC -o .libs/glpk_wrap.o
src/java/glpk_wrap.c: In function ‘Java_org_gnu_glpk_GLPKJNI_glp_1vprintf’:
src/java/glpk_wrap.c:7672: error: incompatible types in assignment
make: *** [all] Error 1


I am not an experienced c/c++ programmer, and can not immediately see the problem. The source code for the function Java_org_gnu_glpk_GLPKJNI_glp_1vprintf

SWIGEXPORT void JNICALL Java_org_gnu_glpk_GLPKJNI_glp_1vprintf(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) {
char *arg1 = (char *) 0 ;
va_list arg2 ;
va_list *argp2 ;

(void)jenv;
(void)jcls;
arg1 = 0;
if (jarg1) {
arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
if (!arg1) return ;
}
argp2 = *(va_list **)&jarg2;
if (!argp2) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null va_list");
return ;
}
arg2 = *argp2;
glp_vprintf((char const *)arg1,arg2);
if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
}

and line 7672 is
arg2 = *argp2;

Any ideas to what is wrong, would be appreciated.

Best regards
Torben




reply via email to

[Prev in Thread] Current Thread [Next in Thread]