Closed GoogleCodeExporter closed 9 years ago
Hi digerat,
Thanks for your report :)
Could you try again with the verbose (-v) switch and attach the resulting files
? (in
particular, the preprocessed sources)
Cheers
Original comment by olivier.chafik@gmail.com
on 3 Feb 2010 at 3:12
Thanks Oliver. I made some progress... at least I think I have ;^)
I used the attached definition of commands to jnaerator and the result is I get
no
warnings, and I get a jnafuse.jar created that has lots (all?) of what I need
in it.
But I'm having a hard time loading the library as there is no INSTANCE defined
in the
FuseLibrary.java that is generated. Following the Mono example (which shows how
you
load the generated java library etc. it sure seems I need the INSTANCE there.
If I try to follow the pattern used in the MonoLibrary of how instance is
created in
my "calling program", I get the following error.
--------------------------------------------------
Exception in thread "main" java.lang.ExceptionInInitializerError
at my.program.UseJnaFuse.loadFuseLibrary(UseJnaFuse.java:38)
at my.program.UseJnaFuse.main(UseJnaFuse.java:47)
Caused by: java.lang.IllegalArgumentException: Can't determine class with native
methods from the current context (class org.jnafuse.FuseLibrary)
at com.sun.jna.Native.getNativeClass(Native.java:1042)
at com.sun.jna.Native.register(Native.java:1013)
at org.jnafuse.FuseLibrary.<clinit>(i>
public static final int UNIX98_PTY_SLAVE_MAJOR =
(FuseLibrary.UNIX98_PTY_MASTER_MAJOR + FuseLibrary.UNIX98_PTY_MAJOR_COUNT);
}
:17)
... 2 more
Hello, World
--------------------------------------
Sorry to go on and on in an 'issue report', but I guess this is the place to
discuss
using jnaerator, which if I can get it to work for this ROCKS! Thanks for all
the
hard work creating it, it could be a great help in what I'm working on.
Original comment by dige...@gmail.com
on 4 Feb 2010 at 12:59
Attachments:
One more file... the one that uses the jna fuse library and shows how I tried to
"simulate" what is normally done in the generated code that creates the
library's
INSTANCE member.
Original comment by dige...@gmail.com
on 4 Feb 2010 at 12:22
Attachments:
Here is a fuse.jnaerator file that "works". There are problems with the
generated
code though, e.g. fuse_operations thinks it's using stat64 even though I
believe it
should just be using stat as a type for arguments (see getattr_callback in
fuse_operations.java) However, you can load and use the generated java library
(getting it to work properly is another issue ;^) )
Original comment by dige...@gmail.com
on 9 Feb 2010 at 12:41
Attachments:
Hi,
This issue moved to Github :
https://github.com/ochafik/nativelibs4java/issues/138
Thanks for not updating this page anymore and adding further comments on Github.
Cheers
--
zOlive
Original comment by olivier.chafik@gmail.com
on 1 Sep 2011 at 7:25
Original issue reported on code.google.com by
dige...@gmail.com
on 3 Feb 2010 at 2:08