GCC and VCPP generate the same stdcall symbols. How are you
exporting yours?
The JNA tests generate the symbols via "__declspec(dllexport)"
preceding each function, and symbols with a preceding underscore are
found properly.
What is your OS and version (type "ver" in a command window)?
I'll double check the gcc vs MSVC-generated symbols, and augment
StdCallFunctionMapper if necessary. In the meantime, just make
your own functionmapper that extends StdCallFunctionMapper that
prepends the underscore.
On Dec 12, 2007, at 10:02 AM, Nicolas Vienne wrote:
1. What is wrong in my use of the function mapper ?
2. Will it work (I'm optimistic) with function whose symbol ends
with
@12 or @20 ?
1. That should work, and does work within JNA's own unit tests (see
W32StdCallTest). Make sure you're doing a clean build.
2. Yes, it will work with any function callable from JNA
Well, it seems that the symbols packaged in my DLL (I'm using VC++
6.0)
starts with an underscore and thus the function "add" is not
found. The
problem is solved by using "_add" instead but it is not
satisfactory for
me. Is there a way to have the _ taken into account ?
For 2. I'll make further checks !
Thank you for your help so far !