Comments (9)
Please try to use the Maven plugin as per the JavaCPP Presets or Gradle JavaCPP:
https://github.com/bytedeco/gradle-javacpp
from javacpp-presets.
Please try to use the Maven plugin as per the JavaCPP Presets or Gradle JavaCPP: https://github.com/bytedeco/gradle-javacpp
I looked through it and some other stuff but to be honest I am still quite confused about how I'm supposed to use it.. I'd like to ask is the plugin able to parse native header files or does that have to be done with the javacpp.jar ?
from javacpp-presets.
Sure, please start here: https://github.com/bytedeco/javacpp-presets/wiki/Create-New-Presets
from javacpp-presets.
Sure, please start here: https://github.com/bytedeco/javacpp-presets/wiki/Create-New-Presets
yeah I also gave that a read before making a post. Still couldn't quite get it but after giving it another look I decided to take a peek in the pom.xml that's in the base javacpp-presets and I think I found what I needed, but it still doesn't work. More specifically this part seems to not be working:
<execution>
<id>javacpp-parser</id>
<phase>generate-sources</phase>
<goals>
<goal>parse</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/src/gen/java</outputDirectory>
<classOrPackageName>org.example.*</classOrPackageName>
</configuration>
</execution>
In org.example there is a class called Mapper that has a Properties and Platform annotation with an included .hpp header and a target and global. For some reason when I run mvn clean install though, I get this:
[WARNING] No classes found in package org.example
from javacpp-presets.
You'll need to compile those classes with a call to maven-compiler-plugin before that.
from javacpp-presets.
You'll need to compile those classes with a call to maven-compiler-plugin before that.
Here are all the plugins in my pom.xml, which also includes the maven-compiler-plugin (still doesn't work)
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
<executions>
<execution>
<id>default-compile</id>
</execution>
<execution>
<id>javacpp-parser</id>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<includes>
<include>${project.build.sourceDirectory}/org/example/*.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>1.5.9</version>
<configuration>
<classPath>${project.build.outputDirectory}</classPath>
<includePaths>
<includePath>${project.build.sourceDirectory}/org/example/nat/</includePath>
</includePaths>
<copyLibs>true</copyLibs>
</configuration>
<executions>
<execution>
<id>javacpp-validate</id>
<phase>validate</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<targetDirectories>
<targetDirectory>${project.basedir}/src/gen/java</targetDirectory>
</targetDirectories>
</configuration>
</execution>
<execution>
<id>javacpp-parser</id>
<phase>generate-sources</phase>
<goals>
<goal>parse</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/src/gen/java</outputDirectory>
<classOrPackageName>org.example.*</classOrPackageName>
</configuration>
</execution>
<execution>
<id>javacpp-compiler</id>
<phase>process-classes</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/native/${javacpp.platform.nativeOutputPath}</outputDirectory>
<classOrPackageName>org.example.**</classOrPackageName>
<copyLibs>true</copyLibs>
<copyResources>true</copyResources>
<configDirectory>${project.build.directory}/native/META-INF/native-image/nativeImage/</configDirectory>
</configuration>
</execution>
</executions>
</plugin>
from javacpp-presets.
So, everything works? We can close this?
from javacpp-presets.
No, I guess not. Like I said, try to do like with the presets.
from javacpp-presets.
No, I guess not. Like I said, try to do like with the presets.
I think I may have accidentally deleted the rest of my comment aside from the maven stuff. Yeah it still doesn't work (I actually did have the compiler-plugin before that as well) and also that is pretty much exactly like how the presets do it. I suppose I will take a look again a bit later but at the moment I have ran into another issue.
from javacpp-presets.
Related Issues (20)
- Consider enable libdav1d HOT 3
- android-arm and android-x86 binaries are missing for latest ffmpeg HOT 7
- [TensorRT] How to save engine to disk HOT 2
- 1.5.9: Could not initialize class org.bytedeco.opencv.opencv_core.Mat HOT 10
- How to rely on the org.bytedeco:ffmpeg library in Android development HOT 1
- PyTorch AdaptiveAvgPool2dImpl constructor HOT 2
- Missing Py*_Check Methods in JavaCPP Preset for CPython HOT 1
- [PyTorch] How to check if a tensor is None HOT 5
- arpack-ng-platform adds macosx-arm64 support HOT 3
- NegativeArraySizeException when building native image with cuda-redist using (flandmark-demo) HOT 3
- [PyTorch 2.2.2-1.5.11-SNAPSHOT] Exception java.lang.UnsatisfiedLinkError: no jnitorch in java.library.path on WIndows HOT 15
- Error trying to build android-arm HOT 3
- [PyTorch 2.2.2-1.5.11-SNAPSHOT] Training produces poor MNIST model on Windows HOT 7
- [PyTorch] Training is very slow on Linux. HOT 9
- Shaka-Packager Preset HOT 3
- [PyTorch] torch.cuda.is_bf16_supported() is missing HOT 8
- [PyTroch] torch_cuda.set_device() and torch.manual_seed() hang HOT 5
- UnsatisfiedLinkError with tesseract-platform after upgrade to 5.3.4-1.5.10 HOT 1
- ffmpeg: av_parser_parse2 missing @ByPtrPtr for poutbuf_size HOT 1
- [PyTorch] model always loaded to GPU device 0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javacpp-presets.