jloyd / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

OpenCV 2.30 MINGW libraries issues #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install OpenCV 2.3 on Windows XP SP3
2. Install JavaCV latest
3. Set path variable so JavaCV will use x86/mingw/bin
4. Compile and run javacv examples

What is the expected output? What do you see instead?
... Local Settings\Temp\jniopencv_corexxxxxxxxx.dll: Can't find dependent 
libraries.

What version of the product are you using? On what operating system?
Windows XP SP3, JavaSDK 2.6 with Netbeans 6.9.1

Please provide any additional information below.
I found that jniopencv_core.dll was looking for opencv_core230.dll while in 
mingw, this library was named libopencv_core230.dll
I tried to find the source code of jniopencv_core.dll but did not find it. Any 
one please corrects the code and update javacv PLEASE?

Original issue reported on code.google.com by vin...@gmail.com on 29 Jul 2011 at 3:34

GoogleCodeExporter commented 9 years ago
If you want to use the MinGW libs, you will need to compile JavaCV from source 
using JavaCPP (e.g.: ant -Djavacpp.options="-properties mingw-x86" ) but I have 
not tested it and you may need to adjust a few properties (check inside the 
mingw-x86.properties file of JavaCPP)

Original comment by samuel.a...@gmail.com on 29 Jul 2011 at 4:20

GoogleCodeExporter commented 9 years ago
Thanks Sam! but where can I get the source code of javac-windows-x86.jar which 
contains a number of DLL to access opencv-*.dll. I think I might understand the 
problem better by looking at the source code. 

Original comment by vin...@gmail.com on 29 Jul 2011 at 5:13

GoogleCodeExporter commented 9 years ago
It's generated at build time by JavaCPP...

Original comment by samuel.a...@gmail.com on 29 Jul 2011 at 5:16

GoogleCodeExporter commented 9 years ago
Hi Sam,
I found only jniopencv_core.cpp in javacpp built folder. how can I generate 
those DLL from it? Thanks

Original comment by vin...@gmail.com on 29 Jul 2011 at 5:23

GoogleCodeExporter commented 9 years ago
Just run the Ant command I gave you.. If it does not compile, then check the 
error message

Original comment by samuel.a...@gmail.com on 29 Jul 2011 at 6:39

GoogleCodeExporter commented 9 years ago
Hi Sam,
I tried to compile following your instruction and found that g++ cannot get 
through jniopencv_core.cpp. It throws many "undefined reference to ..." errors 
(by ld). I guessed some lib is missing. Please give me some instructions. 
Thanks a lot.
Vic

Original comment by vin...@gmail.com on 29 Jul 2011 at 7:13

GoogleCodeExporter commented 9 years ago
Hi Sam,
I've been trying to play with mingw-x86.properies by changing 
compiler.link.prefix=-llib
compiler.link.suffix=.dll.a
without success. ld.exe says it cannot find -llibopencv_core230.dll.a, which is 
the required lib file.
Any suggestion?
Thanks a lot!

Original comment by vin...@gmail.com on 29 Jul 2011 at 7:56

GoogleCodeExporter commented 9 years ago
AFAIK, gcc can link directly with the DLL files. Read the MinGW documentation 
about it

Original comment by samuel.a...@gmail.com on 30 Jul 2011 at 1:45

GoogleCodeExporter commented 9 years ago
Hi Sam,
I managed to compile through standard opencv stuff but then got stuck at the 
3rd party libraries. Some of them recommed to use gcc instead of g++ e.g. 
ffmpeg. Can you please give me some suggestion? Thanks!

Original comment by vin...@gmail.com on 30 Jul 2011 at 11:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Info on how to build FFmpeg with MinGW is availabe on this site 
http://ffmpeg.zeranoe.com/ so I'm not sure what else you want to know? JavaCV 
will link against FFmpeg 0.7.x just fine with g++, as long as compiled binaries 
are there.

Original comment by samuel.a...@gmail.com on 9 May 2012 at 1:18