adam-faulkner / jnaerator Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/jnaerator
Automatically exported from code.google.com/p/jnaerator
when building I get a bunch of warnings on my machine:
sources/com/ochafik/swing/syntaxcoloring/TextAreaDefaults.java:56: warning:
unmappable character for encoding UTF8
{*/ // on est oblig� de cr�er un objet nouveau � chaque fois
^
You may want to avoid non ASCII characters in source and comments.
Original issue reported on code.google.com by [email protected]
on 13 Jun 2009 at 7:58
I'm trying to generate JNA interface using JNAerator for a C library but
I've got a lot of exception like this one:
line 1:10 Failed to match any alternative with token [@4,10:10='5',<4>,1:10]
File: null:1
Input: ( ( FEA_INT ) 5 )
Rule: ()* loopback of 1407:3: (op= ( '<' | '<=' | '>' | '>=' ) f=
shift
Expr )*
Stack: [expression, topLevelExprList, topLevelExpr, assignmentExpr,
inlineCondExpr, logOrExpr, logAndExpr, bitOrExpr, xorExpr, bitAndExpr,
equalExpr, compareExpr, shiftExpr, addExpr, multExpr, castExpr, unaryExpr,
postfixExpr, baseExpression, expression, topLevelExprList, topLevelExpr,
assignmentExpr, inlineCondExpr, logOrExpr, logAndExpr, bitOrExpr, xorExpr,
bitAndExpr, equalExpr, compareExpr]
Find attached the 3 header files and the stlib.dll if you want to reproduce.
My command line is:
java -jar ./lib/jna/jnaerator-v0.6-b367.jar -library stlib -o ./src
C:\FEA\lib\include\dllshare.h C:\FEA\lib\include\feaerror.h
C:\FEA\lib\include\stlib.h C:\FEA\lib\win32\stlib.dll
Original issue reported on code.google.com by [email protected]
on 30 May 2009 at 10:48
Logging of preprocessed sources and macros defaults to off. For debugging
the output might help (the jnaerator developer at least), so a switch would
be good. I will attach a patch to provide this with -logMacros and
-logPreprocessedSources.
Original issue reported on code.google.com by [email protected]
on 8 Jul 2009 at 11:22
Attachments:
Hi,
I am using MSYS/MINGW to compile FFMPEG.
The limits.h file that comes with MinGW as the following preprocessor #if
(the comment is from limits.h too...)
/* TODO: Is this safe? I think it might just be testing the preprocessor,
* not the compiler itself... */
#if ('\x80' < 0)
JNAerator does like the #if:
D:\test\msys\mingw\include\limits.h:41:2: error: Bad token in expression:
'\x80'
D:\test\msys\mingw\include\limits.h:41:2: error: missing ) in expression
D:\test\msys\mingw\include\limits.h:41:8: warning: Unexpected nonwhite token
D:\test\msys\mingw\include\limits.h:41:8: warning: Unexpected nonwhite token
D:\test\msys\mingw\include\limits.h:41:7: warning: Unexpected nonwhite token
This issue seems minor and is not causing further issues down the line.
Original issue reported on code.google.com by [email protected]
on 2 Oct 2009 at 10:35
What steps will reproduce the problem?
1. Launch JNAeratorStudio
2. Click JNAerate! in the menu
What is the expected output? What do you see instead?
It should map "public com.sun.jna.NativeLong longLongValue;" to "public
long longLongValue;", but instead it maps it to "public
com.sun.jna.NativeLong longLongValue;"
What version of the product are you using? On what operating system?
JNAeratorStudio 0.4 (build 244). On windows XP
Please provide any additional information below.
long long is always 64 bit, either in 32 bit or 64 bit procesor, at least
with gnu compiler (I believe microsoft compiler doesn't support this type,
but haven't tested that)
Original issue reported on code.google.com by [email protected]
on 30 Mar 2009 at 11:38
{{{
extern void (*fptr)(int);
}}}
fptr is not jnaerated.
Globals generation + type conversion need an overhaul anyway, big work ahead...
Original issue reported on code.google.com by [email protected]
on 11 Jun 2009 at 8:01
So that library options can be used for these structs
Original issue reported on code.google.com by [email protected]
on 1 Sep 2009 at 6:22
Building in linux (english UTF8 locale) is resulting in warnings:
warning: unmappable character for encoding UTF8
This is due to special characters in comments and/or source code.
This may lead to strange results depending on the platform.
Patch included. (btw I noted that at least at one point a catch Throwable
is happening, catch Exception should be used whenever possible, or even
more specific exception classes. If logging and/or rethrowing is performed,
attach the root exception for easier debugging.)
Original issue reported on code.google.com by [email protected]
on 11 Jul 2009 at 10:48
Attachments:
When the expressions are simple enough to be understood, we should provide
the macros and inline functions encountered during the parsing so that
they're available from Java.
Possible implementation approaches :
- add a "MACROS" / "INLINE" / "_" subclass to generated classes
- add macros and functions as simple methods to the regular top-level
library interface, but tag them with an annotation that somehow indicates
where to find the implementation (inner class ?) and let a modified JNA do
the job of wiring them (slow, partly negates interest of inline).
Original issue reported on code.google.com by [email protected]
on 19 Feb 2009 at 7:10
Currently the tests called by "-test" assume to be in a fixed location.
Patch to make them runable from the jar built by the jnaerator project.
Original issue reported on code.google.com by [email protected]
on 11 Jul 2009 at 10:38
Attachments:
What steps will reproduce the problem?
The issue occurs when I try to build my maven project depending on
jnaerator-runtime-0.9.1 (and not using SNAPSHOT deps).
1. get jnaerator-runtime-0.9.1.pom from
http://jnaerator.sourceforge.net/maven/com/jnaerator/jnaerator-runtime/0.9.1/jna
erator-runtime-0.9.1.pom
2. it contains:
<parent>
<artifactId>jnaerator-parent</artifactId>
<groupId>com.jnaerator</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
3. SNAPSHOT here is very bad.
What is the expected output? What do you see instead?
It should depend on a released version such as 0.9.1.
Released versions should never depend on snapshots. If you decide to
restructure the jnaerator-parent/pom.xml and deploy it as 1.0-SNAPSHOT
again, it probably will brake my build as it will change the configuration
of the already released jnaerator-runtime-0.9.1
What version of the product are you using? On what operating system?
jnaerator-runtime-0.9.1
java 1.6
Original issue reported on code.google.com by [email protected]
on 23 Oct 2009 at 9:25
This enhancement request was taken from Comment 2 of issue #36 by
[email protected], Oct
01, 2009 :
An additional requirement would be to define the static constants inside the
generated classes when the #define is found inside a struct (ffmpeg makes a lot
of
use of this pattern).
It would require a change of the parser to identify the end of each element,
and a change of the
generator to match start/end offsets with #defines.
Original issue reported on code.google.com by [email protected]
on 28 Oct 2009 at 12:21
What steps will reproduce the problem?
1. mvn clean com.jnaerator:maven-jnaerator-plugin:jnaerate install on any
maven project with the plugin declared.
What is the expected output? What do you see instead?
The build aborts before compiling, saying "JNAeration completed !". I
expect compilation to happen.
What version of the product are you using? On what operating system?
version 0.92 on 64bit Ubuntu 9.10
Please provide any additional information below.
The line causing the problem is
http://jnaerator.googlecode.com/svn/trunk/jnaerator/src/main/java/com/ochafik/la
ng/jnaerator/JNAerator.java
line 599. There are a few System.exit()s in that file.
Original issue reported on code.google.com by [email protected]
on 20 Nov 2009 at 6:50
What steps will reproduce the problem?
Generating this:
{{{
@interface A
-(id)f:(id)arg;
@end
}}}
gives :
{{{
package test;
public abstract class A {
...
public abstract org.rococoa.NSObject f(org.rococoa.NSObject arg);
...
}
}}}
What is the expected output? What do you see instead?
We'd expect the arg to be org.rococoa.ID
Original issue reported on code.google.com by [email protected]
on 11 Jun 2009 at 6:49
What steps will reproduce the problem?
1.run jnaerator on c/c++ header file that doesn't have ".h" extension
2.
3.
What is the expected output? What do you see instead?
Parsing of the file. Generated output. Without extension I receive this:
"Now parsing 0 text blocks"
If i copy the file to contain an extension then I receive this:
"Now parsing 27 text blocks"
What version of the product are you using? On what operating system?
jnaerator-v0.9-b614.jar ,MacOSX 10.5.8
Please provide any additional information below.
I'm am trying to wrap a third party lib using jnaerator. The library is
composed of many header
files and many sub libraries. The issue I have is that the headers don't
contain the ".h" suffix in
the name. In fact, they have no suffix. Is it possible to add a flag/option to
parse all files in a
directory no matter the suffix?
Original issue reported on code.google.com by [email protected]
on 31 Aug 2009 at 4:33
- need to look at source file type to know if symbols are C++-mangled by
default
- need to implement mangling schemes of VSC++2008 & GCC 4.x
Original issue reported on code.google.com by [email protected]
on 19 Feb 2009 at 7:05
What steps will reproduce the problem?
1.checkout source from subversion
2.type > mvn install
3.build fails with error
What is the expected output? What do you see instead?
completion of build
What version of the product are you using? On what operating system?
svn revision 892
Please provide any additional information below.
Attached the log output.
Original issue reported on code.google.com by [email protected]
on 19 Nov 2009 at 8:29
Attachments:
In sed version 4.1.5 there is no "-E" switch. I assume this is a typo and
it should read "-e".
Original issue reported on code.google.com by [email protected]
on 13 Jun 2009 at 8:31
What steps will reproduce the problem?
1. I donwload vlc source code from
http://www.videolan.org/vlc/download-sources.html (Latest VLC source code
tarball (1.0.1))
2. use command line : java -jar jnaerator.jar -noComp -noJar -noAuto
-package vlc.java.binding libvlc.h
3. the api "libvlc_new" in libvlc.h was not generated into LibvlcLibrary.java
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
==I used Jnaerator build 621, winXP, JDK1.6.0_15
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 15 Sep 2009 at 7:56
I tried to build from source with the following JARs in classpath:
* antlr-3.1.1-runtime.jar
* binarysearch.jar ( http://ochafik.free.fr/blog/?p=106 )
* jalico-latest.jar
* jna.jar ( 3.0.9 )
* junit.jar ( 4.4 )
* trove-2.0.4.jar
3rd Party source files missing:
* all files for 'slightly patched Anarres JCPP'
'com.ochafik' - source files missing:
* com.ochafik.babel.env.SchemeEnv
* com.ochafik.io.TextAreaOutputStream
* com.ochafik.math.graph.BinaryEdgeSet;
* com.ochafik.math.graph.impl.FastSparseBinaryEdgeSet;
* com.ochafik.swing.JDialogs
* com.ochafik.swing.tree.DefaultTreeNode
* com.ochafik.util.listenable.ListenableListModel
If you add these sources to SVN I will be able to create a Maven project
definition (pom.xml) which will enable everyone to build from source easily.
Original issue reported on code.google.com by [email protected]
on 16 Feb 2009 at 8:52
Hello,
I've got a lot of such exception while jnaerator does parse the header file:
Error in mangling of 'Sgetstripcurve(STRIPLETSTRUC*, short*, CHOICETYPE,
FEA_OUT
PUT*)' : java.lang.NullPointerException
Though the Sgetstripcurve function is generated anyway in the Java interface.
Where could it come from ?
Original issue reported on code.google.com by [email protected]
on 31 May 2009 at 6:29
What steps will reproduce the problem?
1. execute one of the examples: java -Xmx1000m -jar jnaerator-0.9.1.jar
-framework
Foundation -framework AppKit -jar appkit-foundation.jar
2.
3.
What is the expected output? What do you see instead?
The example should produce a working jar, instead the generation process fails
with 33 errors
(see complete log below).
What version of the product are you using? On what operating system?
JNAerator 0.9.1 on Mac OS X 10.6.1, Java 6.
Please provide any additional information below.
I attached the complete log as a txt file. Hope this helps!
Original issue reported on code.google.com by [email protected]
on 29 Sep 2009 at 4:19
Attachments:
What steps will reproduce the problem?
Take example code from [http://theocacao.com/document.page/510] :
{{{
@interface Movie : NSObject {
NSString* title;
NSString* studio;
NSInteger yearReleased;
}
+ (id)movie;
@property (copy) NSString* title;
@property (copy) NSString* studio;
@property (assign) NSInteger yearReleased;
@property (readonly) NSString* summary;
@end
}}}
What is the expected output? What do you see instead?
We need to generate getters and/or setters for properties (readonly => no
setter).
Original issue reported on code.google.com by [email protected]
on 4 Jun 2009 at 8:42
Currently the parser doesn't mind which language the input files were written
into.
As a result, "class", which is a reserved keyword in C++, is not parsed as a
valid identifier in C.
Likewise, it is hard to know whether a symbol should be C++-mangled (behaviour
by default in
*.cpp files) or not (behaviour by default in *.c files).
We should either provide a command-line switch or use the existing
__cplusplus__ symbol to force
a language.
Original issue reported on code.google.com by [email protected]
on 20 Feb 2009 at 8:54
What steps will reproduce the problem?
1.The resulting code produced includes lots of lines such as public class
SKYETEK_ADDRESS extends
com.ochafik.lang.jnaerator.runtime.Structure<SKYETEK_ADDRESS,
SKYETEK_ADDRESS.ByValue, SKYETEK_ADDRESS.ByReference>
2.I need to know where to find com.ochafik.lang.jnaerator
3.A similar problem occurs with generated lines:
@com.ochafik.lang.jnaerator.runtime.Mangling({"_Z20SkyeTek_CreateDeviceP5TCHARPP
14SKYETEK_DEVICE",
"?SkyeTek_CreateDevice@@YAW4SKYETEK_STATUS@@PA5TCHARPAPA14SKYETEK_DEVICE@Z"})
What is the expected output? What do you see instead?
I expect to have access to the runtime library so that these errors can be
removed and the project progress.
What version of the product are you using? On what operating system?
I am running NetBeans IDE 6.7.1 on Windows Vista. I believe I am running
0.9 b21
Please provide any additional information below.
Can provide the .h file if required
Original issue reported on code.google.com by [email protected]
on 17 Sep 2009 at 10:09
What steps will reproduce the problem?
1. svn co of trunk
2. cd jnaerator
3. mvn install
What is the expected output? Build Successful
What do you see instead? listing of unmappable character locations in
DateUtils.java and FileUtils.java
src/main/java/com/ochafik/util/DateUtils.java:[25,31] unmappable character
for encoding UTF8
"récupérer" (it gets the column wrong by one: gedit sees it fine, which
seems odd).
src/main/java/com/ochafik/io/FileUtils.java:[130,40] unmappable character
for encoding UTF8
What version of the product are you using?
Maven version: 2.0.9
Java version: 1.6.0_16 (sun)
OS name: "linux" version: "2.6.28-15-generic" arch: "i386" Family: "unix"
On what operating system?
Ubuntu 9.04
Please provide any additional information below.
I tried
javac -encoding utf8 src/main/java/com/ochafik/util/DateUtils.java
and same error. What encoding is being used? I tried MacRoman and
ISO-8859-1. I think this can be set in the pom.xml.
Original issue reported on code.google.com by [email protected]
on 9 Oct 2009 at 7:42
What steps will reproduce the problem?
1. Go to http://code.google.com/p/jnaerator/
2. Click on Java web start button
(http://ochafik.free.fr/Java/JNAeratorStudio.jnlp)
3. Program doesen't start
What is the expected output? What do you see instead?
com.sun.deploy.net.JARSigningException: Found unsigned entry in resource:
http://jnaerator.sourceforge.net/maven/com/jnaerator/jnaerator/0.9-SNAPSHOT/jnae
rator-0.9-SNAPSHOT.jar
at
com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(SigningInfo.java:
382)
at com.sun.javaws.security.SigningInfo.check(SigningInfo.java:256)
at
com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(LaunchDownload.java:138
4)
at
com.sun.javaws.LaunchDownload.checkSignedResources(LaunchDownload.java:1170)
at com.sun.javaws.Launcher.prepareLaunchFile(Launcher.java:1020)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:306)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:183)
at com.sun.javaws.Launcher.launch(Launcher.java:104)
at com.sun.javaws.Main.launchApp(Main.java:403)
at com.sun.javaws.Main.continueInSecureThread(Main.java:250)
at com.sun.javaws.Main$1.run(Main.java:111)
at java.lang.Thread.run(Thread.java:619)
What version of the product are you using? On what operating system?
Ubuntu 9.04
Sun Java 1.6
Firefox
Please provide any additional information below.
Original issue reported on code.google.com by jacob.nordfalk
on 25 Sep 2009 at 11:42
What steps will reproduce the problem?
the following structure
struct SYSTEMTIME {
char name[16];
};
is converted to
public static class SYSTEMTIME extends com.sun.jna.Structure
{
public static class ByReference extends SYSTEMTIME implements
com.sun.jna.Structure.ByReference {}
public final com.sun.jna.ptr.ByteByReference name = new byte[16];
}
Original issue reported on code.google.com by [email protected]
on 17 Feb 2009 at 8:36
What steps will reproduce the problem?
1. get the read-only code from svn as described
http://code.google.com/p/jnaerator/source/checkout
2. run mvn install
3. it tries to build a non-existing module maven-velocity-plugin. It fails
of course.
4. the pom.xml files include a SNAPSHOT version.
What is the expected output? What do you see instead?
3. It should not build the maven-velocity-plugin. Or the svn should
containg sources for it if it is really needed.
4. I do not want to build a snapshot. How can I get sources of a released
version (0.9.1)? What is its revision number? I can not see any tags in the
svn repo. It would be nice to see tags corresponding to the relesed versions.
What version of the product are you using? On what operating system?
trunk
java 1.6
Original issue reported on code.google.com by [email protected]
on 23 Oct 2009 at 8:56
What steps will reproduce the problem?
$ java -jar jnaerator-0.9.3-SNAPSHOT.jar -library Test Test.h -o . -v
What is the expected output? What do you see instead?
There should be a TestLibrary.java file. What I see is:
$ ls -l
total 11824
-rw-r--r--@ 1 dspitzer HOLLYWOOD\domain users 654 Nov 20 16:15 Test.h
-rw-r--r-- 1 dspitzer HOLLYWOOD\domain users 992493 Dec 3 10:58 Test.jar
-rw-r--r-- 1 dspitzer HOLLYWOOD\domain users 1 Dec 3 10:58
_jnaerator.bridgesupport.h
-rw-r--r-- 1 dspitzer HOLLYWOOD\domain users 570 Dec 3 10:58
_jnaerator.choices
-rw-r--r-- 1 dspitzer HOLLYWOOD\domain users 583 Dec 3 10:58
_jnaerator.macros.cpp
-rw-r--r-- 1 dspitzer HOLLYWOOD\domain users 632 Dec 3 10:58
_jnaerator.preprocessed.c
-rw-r--r--@ 1 dspitzer HOLLYWOOD\domain users 5035045 Nov 26 10:32
jnaerator-0.9.3-
SNAPSHOT.jar
What version of the product are you using? On what operating system?
jnaerator-0.9.3-SNAPSHOT.jar
java version "1.6.0_15"
Mac OS X 10.5.8
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 3 Dec 2009 at 6:59
One step to reproduce:
1. use Jnaerator to process any header file with hyphen in its name, like
"test-me.h"
Expected is some compilable Java class name, like testMeLibrary or
testmeLibrary or whatnot.
The observed result is "test-meLibrary" class which fails to be compiled.
Same applies to the generated package names.
I'm running console jnaerator-0.9.1.jar on Windows Vista OS, with the
following parameters:
java -Xmx1024M -jar jnaerator-0.9.1.jar -direct -entryClass MyLib -package
org.my.lib mylib/*.h
Original issue reported on code.google.com by [email protected]
on 27 Oct 2009 at 10:49
My OpenSolaris box does not have a /usr/include/c++ directory, so that line
causes a null pointer.
Original issue reported on code.google.com by [email protected]
on 6 Aug 2009 at 4:03
As CLASS is only used by the class itself, we can replace all of its uses
by calls to getCLASS(), for instance, that will create the CLASS instance
the first time it is called.
This might speed up loading of large libraries, where hundreds of mutually-
referencing classes may be defined.
Original issue reported on code.google.com by [email protected]
on 4 Jun 2009 at 9:02
static APPKIT_EXTERN NSString constants do not get converted (reported by David
Kocher)
Original issue reported on code.google.com by [email protected]
on 2 Jun 2009 at 2:39
The input:
===========================
SET ffmpg_src="C:\msys\home\xxx\ffmpeg-r19905-swscale-r29687"
SET ffmpg_build="%ffmpg_src%\build"
SET jre="C:\Program Files\Java\jre1.6.0_07\bin\java.exe"
SET includeVS="C:\Program Files\Microsoft Visual Studio 9.0\VC\include"
SET includeSDK="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include"
SET includeMGW="C:\msys\mingw\include"
SET includeLib1="C:\msys\mingw\include\schroedinger-1.0"
SET root="ffmpeg"
SET exec=%jre% -Xmx1024m -jar jnaerator-v0.9.1.jar -noComp -scanSymbols
-limitComments -direct -v -o . -root %root% -I %includeMGW% -I
%includeMGW%\sys -I %ffmpg_src% -I %ffmpg_src%\build -I %includeLib1%
%exec% -library AVCodec %ffmpg_src%\libavcodec
%ffmpg_build%\libavcodec\avcodec.dll
The output:
===========================
....
Generating roq_qcell.java
Generating motion_vect.java
Generating RoqContext.java
Generating RV34VLC.java
Generating SliceInfo.java
Generating RV34DecContext.java
JNAeration failed !
java.lang.NullPointerException
at
com.ochafik.lang.jnaerator.Result.getFakePointerName(Result.java:170)
at com.ochafik.lang.jnaerator.Result.findFakePointer(Result.java:149)
at
com.ochafik.lang.jnaerator.TypeConversion.convertTypeToJNA(TypeConversion.java:9
83)
at
com.ochafik.lang.jnaerator.DeclarationsConverter.convertVariablesDeclaration(Dec
larationsConverter.java:987)
at
com.ochafik.lang.jnaerator.DeclarationsConverter.convertVariablesDeclaration(Dec
larationsConverter.java:1056)
at
com.ochafik.lang.jnaerator.DeclarationsConverter.convertStruct(DeclarationsConve
rter.java:822)
at
com.ochafik.lang.jnaerator.DeclarationsConverter.outputConvertedStruct(Declarati
onsConverter.java:896)
at
com.ochafik.lang.jnaerator.DeclarationsConverter.convertStructs(DeclarationsConv
erter.java:977)
at
com.ochafik.lang.jnaerator.JNAerator.generateLibraryFiles(JNAerator.java:1084)
at
com.ochafik.lang.jnaerator.JNAerator.jnaerationCore(JNAerator.java:1251)
at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:656)
at com.ochafik.lang.jnaerator.JNAerator$1.finished(JNAerator.java:569)
at
com.ochafik.lang.jnaerator.JNAeratorCommandLineArgs$ArgsParser.parse(JNAeratorCo
mmandLineArgs.java:127)
at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:237)
Environment:
===========================
Windows XP SP2
Java 1.6.0._07-b06
jnaerator-v0.9.1.jar
Original issue reported on code.google.com by luzifer42
on 27 Oct 2009 at 8:25
{{{
int byref; // does not parse because of byref objective-c modifier not being
ruled out here
}}}
Need to define scope variables in parser to enable/disable whole families of
modifiers.
Original issue reported on code.google.com by [email protected]
on 22 Jun 2009 at 9:57
What steps will reproduce the problem?
{{{
typedef void (*f)();
void test(f* x);
struct S {
f* pf;
};
}}}
What is the expected output? What do you see instead?
Should use Pointer or some typed structure, instead getting the raw function
pointer (not the
pointer to it !!)
Original issue reported on code.google.com by [email protected]
on 4 Oct 2009 at 12:41
Right now, Objective-C classes are jnaerated as java interfaces.
To make the jnaerated code more Rococoa-idiomatic, it is better to generate
abstract classes (see example from David Kocher here :
http://trac.cyberduck.ch/browser/branches/rococoa/source/ch/cyberduck/ui/co
coa/foundation/NSDate.java?rev=4698).
Logic of generation of static factory methods needs to be updated
accordingly.
Original issue reported on code.google.com by [email protected]
on 2 Jun 2009 at 2:49
Initialization of the default include path is broken on linux, since an
unmodifieable list is created for the default include path. At startime
modifications fail.
patch:
Index: sources/com/ochafik/lang/jnaerator/JNAeratorConfigUtils.java
===================================================================
--- sources/com/ochafik/lang/jnaerator/JNAeratorConfigUtils.java (revision 435)
+++ sources/com/ochafik/lang/jnaerator/JNAeratorConfigUtils.java (working copy)
@@ -97,9 +97,11 @@
list.add(".");
DEFAULT_INCLUDE_PATH = Collections.unmodifiableList(list);
} else {
- DEFAULT_INCLUDE_PATH = Arrays.asList(".");
+ DEFAULT_INCLUDE_PATH = new ArrayList<String>();
+ DEFAULT_INCLUDE_PATH.add(".");
}
if (SystemUtils.isUnix()) {
+ DEFAULT_INCLUDE_PATH = new ArrayList<String>();
DEFAULT_INCLUDE_PATH.add("/usr/include");
Original issue reported on code.google.com by [email protected]
on 13 Jun 2009 at 8:21
Hi,
It seems that the order of #define is not preserved in the generated java code.
The resulting "public static final int ..." statements are in random order.
It would be nice to preserve the original ordering in the generated java code.
Regards.
Original issue reported on code.google.com by [email protected]
on 1 Oct 2009 at 10:51
What steps will reproduce the problem?
1. Try to janearate glib.h on Linux Ubuntu 9.04
2. Set up Maven project with the following config values:
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/linux
-I/usr/lib/gcc/i486-linux-gnu/4.3/include -library Gtk
/usr/include/glib-2.0/glib.h
3. Run the Maven JNAerator plugin
What is the expected output? What do you see instead?
Expected to get a JAR with GLib bindings.
Instead get:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building gtk
[INFO] task-segment: [com.jnaerator:maven-jnaerator-plugin:jnaerate]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing jnaerator:jnaerate
[INFO] No goals needed for project - skipping
[INFO] [jnaerator:jnaerate {execution: default-cli}]
os.arch = i386
/usr/include/glib-2.0/glib/gmessages.h:128:12: error: error in macro
parameters: ...
/usr/include/glib-2.0/glib/gmessages.h:133:37: error: error in macro
parameters: ...
/usr/include/glib-2.0/glib/gmessages.h:136:15: error: error in macro
parameters: ...
/usr/include/glib-2.0/glib/gmessages.h:139:14: error: error in macro
parameters: ...
/usr/include/glib-2.0/glib/gmessages.h:142:12: error: error in macro
parameters: ...
JNAeration completed !
/media/My Passport/Jacek/Dev/Scala/gtk4j/target/generated-sources/java
What version of the product are you using? On what operating system?
0.9.1, Ubuntu 9.04
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 29 Oct 2009 at 7:38
Attachments:
> What steps will reproduce the problem?
1. build some application that includes jnaerator and slf4j logging
2. try to provide logging through log4j using slf4j-log4j12 implementation
3. try to configure logging using log4j.properties
> What is the expected output? What do you see instead?
I expect the application reads log4j.properties and logs according to it.
The jnaerator hijacks all the logging and routes it through jdk14 logging
system. log4j.properties is ignored.
> What version of the product are you using? On what operating system?
0.9.1, but i see 0.9.2 does the same.
> Please provide any additional information below.
I would expect that jnaerator.jar comes only with its own classes, and it
gets other dependencies using its pom.xml.
Including slf4j implementation together with the library jar misses the
main point of slf4j. It is meant that the libraries use only the API jar
(slf4j-api) and depend only on it. The application developer chooses which
implementation to use and include only that specific implementation.
Original issue reported on code.google.com by [email protected]
on 11 Nov 2009 at 8:11
Hi,
I am trying to run the latest (v0.9.1) jnaerator against the latest ffmpeg
Windows libraries.
The result are quite impressing as most dll are handled correctly, but
handling of avformat.dll is partial (stops midway...).
The command line I am running is:
java -jar jnaerator-0.9.1 FFMPEG.jnaerator
I have attached the FFMPEG.jnaerator file and the resulting out.errors.txt
file. I also attached out.txt which captures the stdout/stderr outputs.
Basically, jnaerator is reporting some errors in libavformat/avformat.h and
will not generate all the structs and methods found in this header.
The two offending lines in avformat.h are:
1) a member declaration in AVOutputFormat struct
int (*interleave_packet)(struct AVFormatContext *, AVPacket *out,
AVPacket *in, int flush);
2) a method declaration
int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
AVPacket *pkt, int flush);
Strangely, if in both cases I remove the "AVPacket *out, AVPacket *pkt,"
part, the jnaerator works fine and completes successfully.
I don't expect a quick fix ;-) as I am well aware that the information I am
providing might not be enough to understand and fix the issue.
I am ready to provide more information and try things out should you ask
for it...
Regards and thanks in advance.
Original issue reported on code.google.com by [email protected]
on 1 Oct 2009 at 10:40
Attachments:
http://msdn.microsoft.com/en-us/library/57a97k4e(VS.80).aspx
Original issue reported on code.google.com by [email protected]
on 9 Aug 2009 at 6:20
In other terms,
void CopyBytes(char* dest, const char* source, size_t n, const int* intArray);
no longer gets converted to :
void CopyBytes(ByteByReference destination, ByteByReference source,
NativeLong n, IntByReference intArray);
void CopyBytes(ByteByReference destination, String source, NativeLong n,
int[] intArray);
Original issue reported on code.google.com by [email protected]
on 21 Feb 2009 at 9:52
We need to test that code based on JNAerated sources will keep on building
with forecoming changes.
We could use the Java Compiler API + a set of C headers + associated Java
files that refer to predefined library names that would be generated.
Original issue reported on code.google.com by [email protected]
on 18 Feb 2009 at 10:31
{{{ int* (*x)(); }}} isn't parsed right now.
This is a serious issue, related to the more general variables storage parsing
limitations.
Original issue reported on code.google.com by [email protected]
on 19 Feb 2009 at 10:08
What steps will reproduce the problem?
JNAerate this :
{{{
struct S { int a; };
void f(S**);
}}}
What is the expected output? What do you see instead?
We're getting {{{ f(PointerByReference) }}}.
We should get {{{ f(S.ByReference[]) }}}
Original issue reported on code.google.com by [email protected]
on 16 Jul 2009 at 9:49
What steps will reproduce the problem?
1. Have C header file with
#define DEV_DEBUG ((uint64_t)1 << 8)
Same error with u_int64_t or int64_t
2. run jnaerator-0.9.1.jar
3. get error
What is the expected output?
-- proper parsing of a 64-bit unsigned long typecast 1 shifted 8 bits
What do you see instead?
-- And error message
"Failed to convert define 'DEV_DEBUG => ((uint64_t)1 << 8):"
What version of the product are you using? 0.9.1 On what operating system?
Ubuntu 9.04
Original issue reported on code.google.com by [email protected]
on 8 Oct 2009 at 6:19
Attempt to run JNAerator on a Linux system to generate JNA interfaces for a
library. Rather than using the normal configuration for C code and
considering /usr/include the base directory for finding C header files
(along with /usr/include/c++ and its subdirectories for the C++ STL) such
that "include <x/y.h>" locates the file /usr/include/x/y.h, JNAerator
requires that each and every directory from which a header file is included
by the library code be passed to it via -I. This is a PITA since a user
should not have to know what headers from the standard library their target
library uses and where to find those headers.
I'm using 0.4-b408 as available on the downloads with an Ubuntu Linux 9.04
system, with all dependencies installed.
I'll delve into the source of JNAerator and see if I can't submit a patch
to fix this.
Original issue reported on code.google.com by [email protected]
on 11 Jun 2009 at 8:53
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.