Jump to content
Excelsior Forums
Sign in to follow this  

I test sample2 example code in Linux system,but ..

Recommended Posts

a part of sample2 code ...

xFunction f=new xFunction("libsample2.so","int* foo(int*,Point*)");


then I want to change  .....

xFunction f=new xFunction("libsample2.so","int* foo(char , int*, Point*)");

// this is add part ...

Argument[] tmp = new Argument[1];

tmp[0] = new Argument( (char)0);


but find error message......

sample2.java:29: cannot resolve symbol

symbol  : method invoke (com.excelsior.xFunction.Argument[],com.excelsior.xFunc)

location: class com.excelsior.xFunction.xFunction

      int rt = ( (Integer)f.invoke( tmp , arg1 , arg2 ) ).intValue();


1 error


My question is xFunction Library have limit the variable only "pointer part" or only "not pointer part" ?

Could I mix variables that "char type" and "pointer type" , or not ?

Because in all I got examples no any this kind of example .

p.s.: My xFunction is "xFunction 2.15 Evaluation "


Share this post

Link to post
Share on other sites

You shall pass either 'Argument[]' or several separate 'Argument' parameters to method 'invoke'. In your example these ways are mixed: tmp is 'Argument[]', but there are 2 additional simple 'Argument' parameters.

To fix, use 'f.invoke(tmp[0], arg1, arg2).

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