This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Symbol in DLL begin with _
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Subject: Symbol in DLL begin with _
- From: "Pasch, Thomas (ACTGRO)" <extern dot thomas dot pasch at volkswagen dot de>
- Date: Mon, 30 Jul 2001 11:49:04 +0200
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/