I have met with LNK2019 error. The details are
error LNK2019: unresolved external symbol imp__JAWT_GetAWT@8 referenced in function "struct HWND * cdecl getHwndFromComponent(class jobject *,struct JNIEnv *)" (?getHwndFromComponent@@YAPAUHWND@@PAV_jobject@@PAUJNIEnv_@@@Z)
What I am building is a Win32 Console Application in DLL type.
I have included jawt_md.h
. At first, I think it is the problem of 64 bit Java, so I have done things below:
1, Install a 32 bit java
2, Add C:\Program Files (x86)\Java\jdk1.6.0_45\include\win32; to Additional Include Directories.
3, Make sure the java be called in OS level is in C:\Program Files (x86)\Java\jdk1.6.0_45\bin. (Use java -version
to test it)
However, I still meet the same issue when building the project.
Thanks for your help in advance.