This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Symbol in DLL begin with _


Hello, 
this is problably a beginner question. I want to create
DLLs for JNI with cygwin. I've read the messages and
tips about DLLs, wrote a script for making them and 
I think, I've succeeded.
But I've got a strange Problem. When I define a C function
Java_Stack_newStack in my source code I've got
$ nm Stack.dll | grep newStack
2000100c T _Java_Stack_newStack@8
well, the symbol '_Java_Stack_newStack' in the DLL. This is not 
what is expected from Java. The library is loaded
but
$ java Stack
Stack.main
Exception in thread "main" java.lang.UnsatisfiedLinkError: newStack
 at Stack.newStack(Native Method)
 at Stack.<init>(Stack.java:10)
 at Stack.main(Stack.java:27)
the native method 'newStack' (i.e. Java_Stack_newStack) is not 
found. 
I suspect that the leading '_' causes the problem. Is there a way to
get ride off it?
Regards,
Thomas
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

AltStyle によって変換されたページ (->オリジナル) /