Bonjour,

Cela fait plusieurs jours que je cherche à utiliser la DLL ConversApi.dll (toutes les infos sont sur ce site web : http://vtopo.free.fr/convers.htm) et je ne trouve pas la solution à ce problème...
Le voilà :
Je cherche à transformer des coordonnées géodésiques en d'autres coordonnées. Bref, ça c'est pas le problème de comment cette conversion à lieu, mon problème c'est comment appeler la dll :

Voilà mon morceau de code :
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
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
public class ConversionDepuisDll {
 
	public void transfoCoordonnees(){
		    try {
		    	System.load("C:/Convers/ConversApi.dll");
		    	//System.loadLibrary("ConversApi");
 
		    } catch (UnsatisfiedLinkError e) {
		      System.err.println("Native code library failed to load.\n" + e);
		    }
	}
 
	public native void SetConversion(String s1, String s2);
	public native void SetPivot(String s1);
	public native void SetMeridienParis(String s1);
	public native void Conversion(double [] dxy1, String string, int degminsec, int greenwich, double []dxy2, String string2, int km, int i, int degminsec2);
 
	public static void main(String[] args) { 
		ConversionDepuisDll CDDLL = new ConversionDepuisDll(); 
		double [] dXY1 = new double[3];
		dXY1[0]=(double) 0.8863889;
		dXY1 [1]= (double)43.62916667;
		double []dXY2 = new double[3];
		CDDLL.transfoCoordonnees();
		int GREENWICH = 1;
		int DEGDECIMAUX = 2;
		int METRES = 5;
		int KM = 0;
		CDDLL.SetConversion("WGS84","World Geodetic System 1984 (WGS84),0,WGS84,12,0,0,0,0,0");
		CDDLL.SetPivot("WGS84");
		CDDLL.SetMeridienParis("2.2014025°");
		CDDLL.Conversion(dXY1,"ED50",DEGDECIMAUX,GREENWICH,dXY2, "LT3",KM,0,METRES);
	}
 
}
et voilà l'erreur que j'ai :

Exception in thread "main" java.lang.UnsatisfiedLinkError: conversions.ConversionDepuisDll.SetConversion(Ljava/lang/String;Ljava/lang/StringV
at conversions.ConversionDepuisDll.SetConversion(Native Method)
at conversions.ConversionDepuisDll.main(ConversionDepuisDll.java:31)
Je vois bien qu'il y a un souci d'utilisation de la dll, mais je ne sais pas comment y pallier...

alors si quelqu'un veut bien essayer de me dépanner avant la fin 2008, ce serait une dernière bonne action!




D'avance merci!