Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JNI related query (error LNK2019: unresolved external symbol)

Status
Not open for further replies.

isaisa

Programmer
May 14, 2002
97
0
0
IN
Hi,
I am trying create the .dll out from the .C f ile using the makefile.
I am calling JNI_CreateJavaVM() function from .C file. This function is prototyped in JNI.h. When i tried to build the dll, i got the linker error as :

Creating library edabase.lib and object edabase.exp
edabase.obj : error LNK2019: unresolved external symbol __imp__JNI_CreateJavaVM@
12 referenced in function "struct JNIEnv_ * __cdecl createVM(char const *,char c
onst *)" (?createVM@@YAPAUJNIEnv_@@PBD0@Z)
edabase.dll : fatal error LNK1120: 1 unresolved externals

I have tried to set the path to
set JDK_HOME=%JDK_HOME%;%JDK_HOME%\lib

but this does not help. I am still getting the same error.

Can somebody help me ?

Thanks in advance

sanjay
 
Are you sure you're not using C++ code? Those look like names that have been obfuscated by a C++ compiler to me.
 


Hi,
The compiler is C compiler as per my understanding although the file is .cpp file as you correctly pointed out. This is the code from third party i am trying to build a sll out of makefile.

please correct me if i am on wrong directions as i am new to make files and the command line options for build.
The follwing is the output from the console i have taken.

Code:
cl.exe /nologo /MD /W3 /GX /Z7 /Od -DPROTO_SW -DNT_OS -D_MT -DMTNT -DPRO
TO_SW -DUSE_STDARG -D_X86_=1 -DDEVL=1 -D_WINDOWS -DWIN32 -DNT_INTEL -DUI_NEURON_
DATA -D_WIN32 -DEDABASE_EXPORTS   -c edabase.cpp
edabase.cpp
        cl.exe /nologo /MD /W3 /GX /Z7 /Od -DPROTO_SW -DNT_OS -D_MT -DMTNT -DPRO
TO_SW -DUSE_STDARG -D_X86_=1 -DDEVL=1 -D_WINDOWS -DWIN32 -DNT_INTEL -DUI_NEURON_
DATA -D_WIN32 -DEDABASE_EXPORTS   -c StdAfx.cpp
StdAfx.cpp

Thanks
sanjay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top