• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

calling a pre-existing dll

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi all. I'm sorta new to JNI and I had a question. I have a pre-existing dll called "mydll.dll" and its header file "mydll.h"
I am trying to access a funtion " int GetVersion() " using JNI.
I have written the following C funtion to access the function in the dll
JNIEXPORT jint JNICALL
Java_myApp_GetVersion(JNIEnv *env, jobject obj)
{
jint myInt;
myInt = (*env)->GetVersion();
return myInt;
}
However, when I try to compile this I get the following error
Error E2451 : Undefined symbol 'GetVersion' in function Java_myApp_GetVersion
What am i doing wrong here? Is this the correct way to call the function? Or is the problem caused because of the location of "mydll.dll". Right now it is in the same directory as the C file and the Java classes.
Thanks for your help.
Vinny.

[This message has been edited by Vinny Iyer (edited September 19, 2001).]
reply
    Bookmark Topic Watch Topic
  • New Topic