Questions tagged [javacpp]

JavaCPP - a bridge between Java and native C++.

JavaCPP provides efficient access to native C++ inside Java, not unlike the way some C/C++ compilers interact with assembly language.

122 questions
1
vote
0 answers

JavaCPP with Android NDK

I'm trying use JavaCPP and trying to build the project in Eclipse. However, I encounter java.lang.UnsatisfiedLinkError when I try to make a call from my Java class to a C++ function. I have also tried the command java -jar libs/javacpp.jar…
legen
  • 25
  • 4
1
vote
1 answer

Grab Frame VideoToGif in Android

I'm trying to grab frames from an Video file in android, the only alternative (tha is already compiled an ready for use) is the videoToGif Project. It uses JavaCV, JavaCpp and Java SE inside Android! The final apk is really big, but I'm doing just…
IPValverde
  • 2,019
  • 2
  • 21
  • 38
0
votes
0 answers

Data consistency and native callback from java

I have Java code that calls a native function which fills results by invoking a callback method multiple times before it returns. The native code doesn't spawn any threads on its own. All java-native is handled by javacpp. The outline looks like…
milan
  • 2,355
  • 2
  • 23
  • 38
0
votes
0 answers

When performing an overlay operation with ffmpeg, the video at the top becomes blurry

I have encountered a strange problem. When using ffmpeg provided in javacpp-presets to perform an overlay operation on two videos, if the video at the bottom is in motion, the video at the top becomes blurry. However, when I use locally compiled…
Lance
  • 291
  • 1
  • 3
  • 5
0
votes
0 answers

Calling C++ function from JNI Android

I am work with JNI for the first time where I am trying to implement a Unicode converter. Here is the converter logic. converter.h #ifndef CONVERTER_H_ #define CONVERTER_H_ #include #include class Converter { private: …
Dragon
  • 11
  • 1
0
votes
1 answer

How do I resolve UnsatisfiedLinkError with JavaCPP native libraries while using JPMS Java modules?

I have a Java 17 project using Gradle with a multitude of JavaCPP libraries. I started with a simple demo project that I cloned from the JavaCPP Github repo. This sample project incorporates several native libs such as OpenCV, ffmpeg, etc., so I…
0
votes
0 answers

Javacpp: problem with linked library - symbol not found in flat namespace

I'm trying to use javacpp library. I've prepared c-lib with one function char * hello(const char * name); and build it with cmake (on mac, with clang++) Also I've prepared config file for javacpp package arrival; import…
Valentina Chumak
  • 279
  • 6
  • 17
0
votes
0 answers

How can I use javacpp reach the class like class #define XXX{}?

part of c++ code : class CTB_DLL ctb::Terrain { public: /// Create an empty terrain object Terrain(); /// Instantiate using terrain data on the file system Terrain(const char *fileName); /// Read terrain data from a file handle …
KuCao
  • 1
  • 1
0
votes
0 answers

Problems for Java program using JavaCPP converts to GraalVM native image in micronaut framework

Environment: OS: Ubuntu 20.04 64bit LTS. JDK: 11.0.10 JavaCPP: 1.5.6 OpenCV: 4.5.3 Micronaut: 2.5.9 Recently I have a project regarding computer vision. In this project, it uses Micronaut as the main framework. And it also uses OpenCV built with…
wureka
  • 731
  • 1
  • 11
  • 26
0
votes
0 answers

JavaCPP Presets for ONNX : Platform "windows-x86_64" not supported

I'm using this JavaCPP Presets for ONNX tutorial and I got error with this message in : Exception in thread "main" java.lang.UnsatisfiedLinkError: Platform "windows-x86_64" not supported by class org.bytedeco.onnx.ISchemaRegistry at…
0
votes
0 answers

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniTest in java.library.path Eclipse

I am trying a Maven Project with javacpp from Eclipse, and the project builds, but when I try to run it, it gives an exception and terminates itself. I am pretty new to Maven and managing pom.xml files, and I don't know what to do. The exception…
hael
  • 49
  • 1
  • 7
0
votes
0 answers

Convert a C++ class into a Java project in Eclipse

I've been learning JavaCPP for a project using Eclipse, and I created a Java project for the application. But when I try to create a class in the /src/main/resources directory, it can't find any folders and says "no entries available".
hael
  • 49
  • 1
  • 7
0
votes
0 answers

JavaCPP FFMpeg to JavaSound

I have a problem to be able to read audio using JavaCPP FFMpeg library. I don’t know how to pass it to java sound and I don’t know too if my code is correct. Let’s see the more important part of my code (video is OK so I drop this) : The…
TW2
  • 33
  • 8
0
votes
1 answer

JavaCPP error: cannot convert `char*` to `Abc*` for argument ‘1’ to `void testMyObject(Abc*)`

I have a simple cpp file with extern functions. One function returns the reference of class Abc and other one receives it and calls some method: extern "C" { void* getMyObject(int arg1, int arg2) return new Abc(); } void testMyObject(Abc* p)…
0
votes
0 answers

Unable to interact with shared objects (.so files) using JavaCPP

I am trying to load a pre-compiled dynamic library ( libabc.so ) which contains extern functions declared in header and cpp files. But I am getting error during compilation. The header and CPP file are as below : [ export.h ] extern "C" { void…
1 2 3
8 9