// Get the AWT
awt.version = JAWT_VERSION_1_4;
result = JAWT_GetAWT(env, &awt);
assert(result != JNI_FALSE);
// Get the drawing surface
ds = awt.GetDrawingSurface(env, component);
if(ds == NULL)
return;
// Lock the drawing surface
lock = ds->Lock(ds);
assert((lock & JAWT_LOCK_ERROR) == 0);
// Get the drawing surface info
dsi = ds->GetDrawingSurfaceInfo(ds);
// Get the platform-specific drawing info
dsi_win =
(JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
//code here
// Free the drawing surface info
ds->FreeDrawingSurfaceInfo(dsi);
// Unlock the drawing surface
ds->Unlock(ds);
// Free the drawing surface
awt.FreeDrawingSurface(ds);
}
il y a un problème à la méthode JAWT_GetAWT parce que je recois l'erreur suivante :
undefined reference to `_imp__JAWT_GetAWT@8'
est-ce un problème d'inclusion de bibliothèques ou autres??
Twinuts
Messages postés5375Date d'inscriptiondimanche 4 mai 2003StatutModérateurDernière intervention14 juin 2023111 9 janv. 2006 à 22:54
Salut,
Bon pour quand tu utilise jawt_md.h tu ne dois pas le faire comme tu fais mais plus comme suit
#include <jawt_md.h>
et pour ne pas obtenir d'erreur dans ta ligne de compilation tu ajoute
le repertoire include de java exemple chez moi (sous linux mais le
principe est le meme à ce niveau)
scaryman
Messages postés492Date d'inscriptionvendredi 30 janvier 2004StatutMembreDernière intervention16 mai 200712 10 janv. 2006 à 17:07
salut
merci Twinuts mais si j'enlève cette ligne là le code compile bien et j'ai bien mis ces dossiers dans les inclusions du compilateur.
Pourrais-tu essayer de compiler ce code chez toi pou voir si ca marche.
Voici le code du fichier Hello.h :
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class Hello */