*
The moose likes Java in General and the fly likes Urgent - Using AWT Native interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Urgent - Using AWT Native interface" Watch "Urgent - Using AWT Native interface" New topic
Author

Urgent - Using AWT Native interface

padmanabh dongre
Greenhorn

Joined: Aug 13, 2001
Posts: 24
Hi
i am trying to run an example given in jdk1.4 help. its about rendering on a Canvas using a native rendering library. the java class CustomCanvas which extends Canvas declares its paint method as native and implements it in C++. now my problem is follows :
I am suppose to include the jawt_md.h , jni.h and other .h files which i have done. so my C++ code compiles, but while creating a dll of this program i get the following error in VC -
Linking...
Creating library Debug/canvas.lib and object Debug/canvas.exp
canvas.obj : error LNK2001: unresolved external symbol __imp__JAWT_GetAWT@8
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/canvas.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
i think i am suppose to link this with jawt.dll which resides in jdk1.4/jre/bin folder. i am not able to do this.
Does anyone know how to link this? plz help , its urgent..
Thanx,
Padmanabh
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Urgent - Using AWT Native interface
 
Similar Threads
Build a dll for JNI
C++ Client linking error
JVM_DumpAllStacks/cl linking
Please help...I'm dying here.
JNI: Error shown by both CL and Bcc32 while making DLL file