![]() |
|
[C] Issue creating shared opencv and JNI library - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C] Issue creating shared opencv and JNI library (/showthread.php?tid=4772052) |
Issue creating shared opencv and JNI library - Zy0n - Apr 10, 2015 I'm attempting to compile and create a shared library to use between the Java Native Interface and the OpenCV library. Ultimately I want to access and use the bagofwords class functions available in the default version of OpenCV, but not in the Java port which I am using. But for the moment I am just testing some simple functions to see if they work. Here they are as follows: PHP Code And here is my cpp class. PHP Code I'm doing this on a Ubuntu VPS machine, using the gcc compiler I am running the following command: PHP Code This compiles the .so library successfully, but checking it i get several undefined reference errors as such: PHP Code Which leads me to beleive I am not referencing the libraries properly, but if that's the case what am i missing? * - g4143 - Apr 10, 2015 Oops my bad. I thought you were looking up the *.so and not creating it. * - Zy0n - Apr 10, 2015 (Apr 10, 2015 11:49 AM)g4143 Wrote: Oops my bad. I thought you were looking up the *.so and not creating it. I'm actually linking to the .a (archive) file. I'm in the middle of running make to build a set of linked libraries so I'll see how that goes. * - g4143 - Apr 10, 2015 Did you check out this Ubuntu link which shows you how to compile? https://help.ubuntu.com/community/OpenCV |