Jump to content
Excelsior Forums
Sign in to follow this  
JohnnyJane

xFunction cannot call C++ methods ??

Recommended Posts

For the same program, I can use the xfunction to call C methods in

java; but when I  use the xfunction to call C++ methods in  java, it

doesn't  work. 

And the error message said, Exception in thread "main" com.excelsior.xFunction.FunctionNotFound Exception: can't load funciton: ' _foo@16 '

Is that the limitation of xfunction when it encounters C++ ?

Thank you for your reply.

Share this post


Link to post
Share on other sites

Use dependency walker to view the C functions exposed by your native library. Wrap your exports with "extern C" so that their names don't get munged, eg...

extern "C" {

__declspec(dllexport) BOOL isRegistered ();

__declspec(dllexport) void protectedFunction ();

}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×