Bonjour,

je cherche depuis un certain temps à résoudre un probème de compatibilité par rapport au JNI.

J'ai un projet que j'essaie de compiler mais j'ai l'erreur suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
JNI/JSpice.c: In function `Java_src_0002fde_mpg_mpi_1hd_jspice_JSpice_str2et':
JNI/JSpice.c:243: error: incompatible types in return
JNI/JSpice.c: In function `Java_src_0002fde_mpg_mpi_1hd_jspice_JSpice_utc2jd':
JNI/JSpice.c:275: error: incompatible types in return
et donc dans mon fichier JSpice.c les entetes de ces fonctions sont :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
.........
JNIEXPORT jdouble JNICALL 
Java_src_0002fde_mpg_mpi_1hd_jspice_JSpice_str2et 
(JNIEnv *env, jclass obj, jstring jStr)
{
............
}
......
JNIEXPORT jdouble JNICALL 
Java_src_0002fde_mpg_mpi_1hd_jspice_JSpice_utc2jd
(JNIEnv *env, jclass obj, jstring jUTC)
{
....
}
et dans mon fichier JSpice.h j'ai :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
JNIEXPORT jdouble JNICALL Java_src_0002fde_mpg_mpi_1hd_jspice_JSpice_str2et
  (JNIEnv *, jclass, jstring);
....
JNIEXPORT jdouble JNICALL Java_src_0002fde_mpg_mpi_1hd_jspice_JSpice_utc2jd
  (JNIEnv *, jclass, jstring);
je ne sais pas du tout comment résoudre ce problème de typage, pour java double est un objet... et pour C non...

un coup de main SVP.

MERCI