-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to use libecl in Java using JavaCPP #730
Comments
I'm doing some progresses, but one problem I'm facing is that among the include file it seems there are circular dependencies: the includes need to be sorted, so they will declare and define types in a orderly fashion as all the library calls will end up in a single Java class. Is this a known problem? |
Hi! Sorry for the late response. This seems like a pretty cool project. I'm not aware of anyone using Java at Equinor, however I think it's a nice idea worth pursuing. The circular dependencies you mention is usually solved with include guards in C and C++. A well-written C program should let you select any include in any order. If you have a list of includes with circular dependencies I'd be happy to take a look and see what I can do. |
Hi here I am, thanks for the reply! Basically JavaCPP is building a .dll to create a JNI (Java Native Interface) to libecl, so that all libecl functions are available to a Java application as well. By doing so there is a configuration file: in that file I listed all include files sorting them by using topological sorting. I did that by compiling a list of all dependencies from the The topological sorting turned out not to be doable, but at least I got a partly sorted list. Then I tinkered with it by hand: the final result is the list in org/bytedeco/libecl/presets/libecl.java. Now I'm facing other errors when compiling: see the resulting JNI .cpp file jnilibecl.cpp.txt and the output from the compilation in using Maven maven-build-output.txt. These are the lines with "error: ":
Any clue is welcome! Here is the pull request to integrate libecl in the set of C/C++ libraries made available through JavaCPP: bytedeco/javacpp-presets#947 |
Seems like the type for |
Are there any updates on this, @matteodg ? |
Hi, sorry I hadn't had a chance yet, but I'll get to this again during these holidays. |
Hello,
I just wanted to let you know that I started to create all infrastructure to allow to use libecl in Java using JavaCPP.
The idea is to follow the instructions in JavaCPP Presets and add libecl as another library available among the presets.
Here is the PR I'm working on: bytedeco/javacpp-presets#947
I'm not a C/C++ expert, so I might need some help if someone is interested.
I would like to help to allow to use libecl in Java.
Thanks in advance!
The text was updated successfully, but these errors were encountered: