Hello,
I'm trying to build OpenCV on Ubuntu 16.10. The build process is interrupted with the error shown below.
Obviously the file "/usr/include/c++/6/stdlib.h" exists in my system. I have tried this with: OpenCV master branch, OpenCV 3.1.0, 3.0.0, 2.4.13.
Could you please give me some clues what can cause this error and how to solve it? All ideas are welcome :)
...
[ 16%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/bitstrm.cpp.o
[ 16%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/rgbe.cpp.o
[ 16%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/exif.cpp.o
[ 16%] Linking CXX shared library ../../lib/libopencv_imgcodecs.so
[ 16%] Built target opencv_imgcodecs
Scanning dependencies of target opencv_highgui_automoc
[ 16%] Automatic moc for target opencv_highgui
Generating moc_window_QT.cpp
[ 16%] Built target opencv_highgui_automoc
Scanning dependencies of target opencv_highgui_pch_dephelp_automoc
[ 16%] Automatic moc for target opencv_highgui_pch_dephelp
[ 16%] Built target opencv_highgui_pch_dephelp_automoc
Scanning dependencies of target opencv_highgui_pch_dephelp
[ 16%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/opencv_highgui_pch_dephelp.cxx.o
[ 16%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/opencv_highgui_pch_dephelp_automoc.cpp.o
[ 16%] Linking CXX static library ../../lib/libopencv_highgui_pch_dephelp.a
[ 16%] Built target opencv_highgui_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_highgui
[ 16%] Generating precomp.hpp
[ 16%] Generating precomp.hpp.gch/opencv_highgui_RELEASE.gch
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
from /usr/include/c++/6/algorithm:62,
from /home/alice/opencv/opencv-master/modules/core/include/opencv2/core/base.hpp:55,
from /home/alice/opencv/opencv-master/modules/core/include/opencv2/core.hpp:54,
from /home/alice/opencv/opencv-master/modules/highgui/include/opencv2/highgui.hpp:46,
from /home/alice/opencv/opencv-master/build/modules/highgui/precomp.hpp:45:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
#include_next
^
compilation terminated.
modules/highgui/CMakeFiles/pch_Generate_opencv_highgui.dir/build.make:62: recipe for target 'modules/highgui/precomp.hpp.gch/opencv_highgui_RELEASE.gch' failed
make[2]: *** [modules/highgui/precomp.hpp.gch/opencv_highgui_RELEASE.gch] Error 1
CMakeFiles/Makefile2:4061: polecenia dla obiektu 'modules/highgui/CMakeFiles/pch_Generate_opencv_highgui.dir/all' failed
make[1]: *** [modules/highgui/CMakeFiles/pch_Generate_opencv_highgui.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
↧
ubuntu 16.10, OpenCV build fails - stdlib.h missing
↧
Caffe section in the opencv's makefile
What does Caffe section do in the opencv build. I've tried to google it but without any outcome.

↧
↧
Build failure with android ndk r13b and c++_shared
Because of other dependencies we need to build openCV with ndk r13b and the stl c++_shared. We build on mac OSX.
First we had to fix a small thing in *android.toolchain.cmake* since apparently some header path did change in the ndk 13.
We changed this:
> set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/android/support/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" )
to:
> set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/android/support/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/include" )
Removed *libcxxabi* und *libcxx* from path.
We configure the build:
> cmake_android_arm.sh -DANDROID_STL=c++_shared -DBUILD_SHARED_LIBS=YES -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_ZLIB=ON -DANDROID_NATIVE_API_LEVEL=9
We also tried using a newer android version (21) but it results in the similar behaviour. Performing make results in the following error:
> ~/software/Android-NDK/ndk/sources/cxx-stl/llvm-libc++/include/cwctype:68:9: error: '::iswblank' has not been declared
using ::iswblank;
Building with android version 21 results in a similar error somewhat later in the build:
> ~/software/Android-NDK/ndk/sources/cxx-stl/llvm-libc++/include/cmath:313:9: error: '::signbit' has not been declared
using ::signbit;
When searching for the error we found some information that changing the math.h imports to cmath should fix the error. We tried this but had no success in finding a way to make the build work.
What can we do to get the build to work? If more information is needed I am happy to provide it.
EDIT 1: Spelling
EDIT 2: Again similar behaviour with the ndk r14-beta1. We receive the following error for the new beta sdk:
> ~/software/Android-NDK/ndk/sources/cxx-stl/llvm-libc++/include/cwctype:68:9: error: '::iswblank' has not been declared
using ::iswblank;
↧
Undefined freetype symbols when building openCV 3.2.0
openCV: 3.2.0
OS: Yosemite 10.10.5
compiler: Apple LLVM version 7.0.2 (clang-700.1.81)
I built openCV 3.2.0 successfully, but then I found out that I needed `ffmpeg` support. I installed `ffmpeg` with homebrew, and when I tried to build openCV again, the build failed because of undefined symbols in `freetype` libraries. I then tried to build openCV again without `ffmpeg`, and the build failed with the same errors. Before I installed `ffmpeg` I ran `brew upgrade` and I saw that it upgraded `freetype`, so this may be the source of the problem, but if so I don't know what to do about it. Here's the command I'm running
PYTHON3_DIR=`python3-config --prefix` # Get python 3 path
VIRTUAL_ENV=`python3-config --prefix`
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=$VIRTUAL_ENV \
-D PYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python3 \
-D PYTHON3_PACKAGES_PATH=$VIRTUAL_ENV/lib/python3.5/site-packages \
-D PYTHON3_INCLUDE_DIR=$VIRTUAL_ENV/include/python3.5m \
-D PYTHON3_LIBRARY=$PYTHON3_DIR/lib/libpython3.5m.dylib \
-D PYTHON3_NUMPY_INCLUDE_DIRS=$VIRTUAL_ENV/lib/python3.5/site-packages/numpy/core/include/ \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON \
-D BUILD_opencv_python3=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..
This produces no errors, but when I run `make` I get
[ 26%] Building CXX object modules/freetype/CMakeFiles/opencv_freetype.dir/src/freetype.cpp.o
[ 26%] Linking CXX shared library ../../lib/libopencv_freetype.dylib
Undefined symbols for architecture x86_64:
"_FT_Done_Face", referenced from:
cv::freetype::FreeType2Impl::~FreeType2Impl() in freetype.cpp.o
cv::freetype::FreeType2Impl::loadFontData(cv::String, int) in freetype.cpp.o
"_FT_Done_FreeType", referenced from:
cv::freetype::FreeType2Impl::~FreeType2Impl() in freetype.cpp.o
"_FT_Init_FreeType", referenced from:
cv::freetype::FreeType2Impl::FreeType2Impl() in freetype.cpp.o
cv::freetype::FreeType2Impl::FreeType2Impl() in freetype.cpp.o
cv::freetype::createFreeType2() in freetype.cpp.o
and a bunch of other missing symbols. When I run `nm freetype.cpp.o` those symbols are listed as undefined all right, but I can successfully install openCV 3.2.0 (with `ffmpeg` support) on Ubuntu 16.04 using `gcc 5.4`, and those same symbols are undefined in `freetype.cpp.o`, so I guess it's trying to link them from another file, but I have no clue which.
I really need installed it on the Mac. I only installed in on Ubuntu as a temporary stopgap. Can you give me any advice?
↧
fata error: LAPACKE_H_PATH-NOTFOUND when building OpenCV 3.2
Hello
I get this error when building OpenCV 3.2:
In file included from /home/username/opencv-3.2.0/opencv/modules/core/src/hal_internal.cpp:49:0:
/home/username/opencv-3.2.0/opencv/build/opencv_lapack.h:2:45: fatal error: LAPACKE_H_PATH-NOTFOUND/lapacke.h: No such file or directory
**#include "LAPACKE_H_PATH-NOTFOUND/lapacke.h"**
LAPACK and BLAS are installed..
Any ideas?
Didn't get these errors with 3.1 or previous 2.4.X versions...
Thanks,
AP
↧
↧
opencv 3.2 build nvcc device fatal error C1083
I'm trying to build OpenCV 3.2 with CUDA and TBB enabled. I've followed the usual directions and generated my solution with CMake. When I try to build opencv_world in Visual Studio 2013 I get the NVCC error on cuda_compile_generated_median_filter.cu.obj:
fatal error C1083: Cannot open include file: 'tbb/tbb.h': No such file or directory
The include path is correct for the TBB package. I can Ctrl-Shift-G on the include tbb and it navigates to the tbb.h file. I've restarted the machine. But the compile still fails.
↧
OpenCV 3.1 build for windows imshow doesn't work
> Blockquote
I build OpenCV 3.1 with CMake 3.2.2 with Visual Studio 2013 64 in Windows 7
WITH_WIN32UI flag is set to true
but when I try to imshow I get the following runtime error:
>OpenCV Error: Unspecified error (The function is not implemented. Rebuild the li
brary with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian,
install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in
cvShowImage, file D:\libs\opencv 3.1\opencv\sources\modules\highgui\src\window.c
pp, line 545
my cmake output is:
>> sizeof(void) = 4 on x86 / x86_64 processor. Assume 32-bit compilation> mode (X86=1) found IPP (ICV version):> 9.0.1 [9.0.1] at: D:/libs/opencv 3.1/opencv/sources/3rdparty/ippicv/unpack/ippicv_win> Could NOT find Doxygen (missing: > DOXYGEN_EXECUTABLE) To enable> PlantUML support, set PLANTUML_JAR> environment variable or pass> -DPLANTUML_JAR= option to cmake Could NOT find PythonInterp> (missing: PYTHON_EXECUTABLE)> (Required is at least version "2.7")> Could NOT find PythonInterp (missing: > PYTHON_EXECUTABLE) (Required is at> least version "2.6") Could NOT find> PythonInterp (missing: > PYTHON_EXECUTABLE) (Required is at> least version "3.4") Could NOT find> PythonInterp (missing: > PYTHON_EXECUTABLE) (Required is at> least version "3.2") Could NOT find> JNI (missing: JAVA_AWT_LIBRARY> JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH> JAVA_INCLUDE_PATH2> JAVA_AWT_INCLUDE_PATH) Could NOT find> Matlab (missing: MATLAB_MEX_SCRIPT> MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR> MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS> MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) > VTK is not found. Please set -DVTK_DIR> in CMake to VTK build directory, or to> VTK install subdirectory with> VTKConfig.cmake file Caffe: NO> Protobuf: NO Glog: NO Module> opencv_sfm disabled because the> following dependencies are not found:> Eigen Glog/Gflags Tesseract: NO> Could NOT find PROTOBUF (missing: > PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR)> Build libprotobuf from sources:> libprotobuf not found into system> The protocol buffer compiler not found Tesseract: NO Complex module> opencv_contrib_world> + opencv_bgsegm> + opencv_bioinspired> + opencv_ccalib> - opencv_cvv> + opencv_datasets> + opencv_face> - opencv_latentsvm> + opencv_line_descriptor> + opencv_optflow> + opencv_reg> + opencv_rgbd> + opencv_saliency> + opencv_surface_matching> + opencv_text> + opencv_tracking> + opencv_xfeatures2d> + opencv_ximgproc> + opencv_xobjdetect> + opencv_xphoto>> General configuration for OpenCV 3.1.0> ===================================== Version control: unknown>> Platform:> Host: Windows 6.1 AMD64> CMake: 3.2.3> CMake generator: Visual Studio 12 2013 Win64> CMake build tool: C:/Program Files> (x86)/MSBuild/12.0/bin/MSBuild.exe> MSVC: 1700>> C/C++:> Built as dynamic libs?: YES> C++ Compiler: C:/Program Files (x86)/Microsoft> Visual Studio 2012/VC/bin/cl.exe (ver> 17.0.50727.1)> C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:fast /wd4251 /wd4324 /wd4275> /wd4589 /MP4 /MD /O2 /Ob2 /D NDEBUG > /Zi> C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:fast /wd4251 /wd4324 /wd4275> /wd4589 /MP4 /D_DEBUG /MDd /Zi /Ob0> /Od /RTC1 > C Compiler: C:/Program Files (x86)/Microsoft> Visual Studio 2012/VC/bin/cl.exe> C flags (Release): /DWIN32 /D_WINDOWS /W3 /D> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:fast /MP4 /MD /O2 /Ob2 /D> NDEBUG /Zi> C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:fast /MP4 /D_DEBUG /MDd> /Zi /Ob0 /Od /RTC1 > Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug> Linker flags (Debug): /machine:X86 /debug /INCREMENTAL > Precompiled headers: YES> Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32> 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff> libjasper IlmImf libprotobuf>> OpenCV modules:> To be built: core flann imgproc ml photo reg> surface_matching video dnn fuzzy> imgcodecs shape videoio highgui> objdetect plot superres ts xobjdetect> xphoto bgsegm bioinspired dpm face> features2d line_descriptor saliency> text calib3d ccalib datasets rgbd> stereo structured_light tracking> videostab xfeatures2d ximgproc aruco> optflow stitching contrib_world> Disabled: world> Disabled by dependency: -> Unavailable: cudaarithm cudabgsegm cudacodec> cudafeatures2d cudafilters cudaimgproc> cudalegacy cudaobjdetect cudaoptflow> cudastereo cudawarping cudev java> python2 python3 viz cvv hdf matlab sfm>> Windows RT support: NO>> GUI: > QT: NO> Win32 UI: NO> OpenGL support: NO> VTK support: NO>> Media I/O: > ZLib: build (ver 1.2.8)> JPEG: build (ver 90)> WEBP: build (ver 0.3.1)> PNG: build (ver 1.6.19)> TIFF: build (ver 42 - 4.0.2)> JPEG 2000: build (ver 1.900.1)> OpenEXR: build (ver 1.7.1)> GDAL: NO>> Video I/O:> Video for Windows: NO> DC1394 1.x: NO> DC1394 2.x: NO> FFMPEG: YES (prebuilt binaries)> codec: YES (ver 56.41.100)> format: YES (ver 56.36.101)> util: YES (ver 54.27.100)> swscale: YES (ver 3.1.101)> resample: NO> gentoo-style: YES> GStreamer: NO> OpenNI: NO> OpenNI PrimeSensor Modules: NO> OpenNI2: NO> PvAPI: NO> GigEVisionSDK: NO> DirectShow: YES> Media Foundation: NO> XIMEA: NO> Intel PerC: NO>> Parallel framework: none>> Other third-party libraries:> Use IPP: 9.0.1 [9.0.1]> at: D:/libs/opencv> 3.1/opencv/sources/3rdparty/ippicv/unpack/ippicv_win> Use IPP Async: NO> Use Eigen: NO> Use Cuda: NO> Use OpenCL: YES> Use custom HAL: NO>> OpenCL:> Version: dynamic> Include path: D:/libs/opencv> 3.1/opencv/sources/3rdparty/include/opencl/1.2> Use AMDFFT: NO> Use AMDBLAS: NO>> Python 2:> Interpreter: NO>> Python 3:> Interpreter: NO>> Python (for build): NO>> Java:> ant: NO> JNI: NO> Java wrappers: NO> Java tests: NO>> Matlab: > Matlab not found or implicitly> disabled>> Documentation:> Doxygen: NO> PlantUML: NO>> Tests and samples:> Tests: YES> Performance tests: YES> C/C++ Examples: NO>> Install path: > D:/libs/opencv> 3.1/opencv/mybuild/install>> cvconfig.h is in: > D:/libs/opencv 3.1/opencv/mybuild
what is wrong?
↧
Build Opencv 3.2 fails on Windows 8.1 with VS2013
Building Opencv-3.2.0 failed on my Windows 8.1 VM, using cmake 3.5.2 and visual studio 2013:
First, Visual Studio fails without showing any helpful message, but after digging I found out `cmake/cl2cpp.cmake` crashes every time. I fixed it by changing this line:
string(REGEX REPLACE "/\\*([^*]/|\\*[^/]|[^*/])*\\*/" "" lines "${lines}") # multiline comments
to:
string(REGEX REPLACE "/\\*[^\n]*\n" "" lines "${lines}") # multiline comments
string(REGEX REPLACE "[^\n]+\\*/\n" "" lines "${lines}") # multiline comments
But ok, that could be a CMake bug.
After that, I'm getting the following errors:
```
7>E:\src\Components\opencv\src\opencv\modules\core\src\parallel.cpp(554): error C2065: 'SYSTEM_INFO' : undeclared identifier
7>E:\src\Components\opencv\src\opencv\modules\core\src\parallel.cpp(554): error C2146: syntax error : missing ';' before identifier 'sysinfo'
7>E:\src\Components\opencv\src\opencv\modules\core\src\parallel.cpp(554): error C2065: 'sysinfo' : undeclared identifier
7>E:\src\Components\opencv\src\opencv\modules\core\src\parallel.cpp(558): error C2065: 'sysinfo' : undeclared identifier
7>E:\src\Components\opencv\src\opencv\modules\core\src\parallel.cpp(558): error C3861: 'GetSystemInfo': identifier not found
7>E:\src\Components\opencv\src\opencv\modules\core\src\parallel.cpp(561): error C2065: 'sysinfo' : undeclared identifier
7>E:\src\Components\opencv\src\opencv\modules\core\src\parallel.cpp(561): error C2228: left of '.dwNumberOfProcessors' must have class/struct/union
7> type is 'unknown-type'
```
The code it is referring to in `parallel.cpp`:
#if defined WIN32 || defined _WIN32
SYSTEM_INFO sysinfo;
And at the top of that file,
#if defined WIN32 || defined WINCE
#include
This error is fixed by checking for _WIN32 as well:
#if defined WIN32 || defined _WIN32 || defined WINCE
#include
I finally got the whole build to succeed after adding `|| defined _WIN32` to a bunch of cpp files.
My question basically is: **am I doing something wrong or is this a bug that should be reported?**
↧
Building OpenCV
I'm trying to build OpenCV 3.2.0 with CMake 3.7.2 (same problem with CMake 3.4.0) and during the configure step I get lots of error messages related to ocv_get_all_libs:
CMake Error at cmake/OpenCVUtils.cmake:964 (get_target_property):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "ARCHIVE_OUTPUT_DIRECTORY" is not allowed.
Call Stack (most recent call first):
cmake/OpenCVGenPkgconfig.cmake:40 (ocv_get_all_libs)
CMakeLists.txt:739 (include)
Any hint how to get around this?
Regards,
Christina Rossmanith
↧
↧
Failed to build OpenCV for Android 2.4.11 under Ubuntu 16.04
Hi, i am getting error when try to build OpenCV for Android (version 2.4.11) under Ubunto 16.04. It failed at **97% Building OpenCV Android library project with error
Buildfile: build.xml does not exist!
Build failed
modules/java/CMakeFiles/opencv_java.dir/build.make:17555: recipe for target 'bin/classes.jar' failed
make[2]: *** [bin/classes.jar] Error 1
CMakeFiles/Makefile2:6551: recipe for target 'modules/java/CMakeFiles/opencv_java.dir/all' failed
make[1]: *** [modules/java/CMakeFiles/opencv_java.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
i checked the link 17555 to 17557 of build.make is as following:-
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/home/mx/opencv2_4_11/opencv-2.4.11/mybuild/CMakeFiles --progress-num=$(CMAKE_PROGRESS_101) "Building OpenCV Android library project"
/usr/bin/ant -q -noinput -k debug
/usr/bin/cmake -E touch /home/mx/opencv2_4_11/opencv-2.4.11/mybuild/bin/classes.jar.dephelper
Does anyone has any idea on the error and why this occur? Thanks.
↧
OpenCV build error
What can I resolve this error? > -- Found VTK ver. 6.2.0 (usefile: /usr/lib/cmake/vtk-6.2/UseVTK.cmake)
CMake Error at cmake/OpenCVModule.cmake:268 (message):
The directory /home/gregory/opencv/modules is observed for OpenCV modules
second time.
Call Stack (most recent call first):
modules/CMakeLists.txt:7 (ocv_glob_modules)
Ubuntu 16.04, opencv-3.2.0, cmake 3.5.1
↧
Build OpenCV 3.2 with IPP_A
I want to build OpenCV 3.2 (for Visual Studio 2015, Win64) with IPP_A. When I tick `WITH_IPP_A` in CMake and configure again, I get the following values:
IPP_A_INCLUDE_DIR = IPP_A_INCLUDE_DIR-NOTFOUND
IPP_A_LIBRARIES = IPP_A_LIBRARIES-NOTFOUND
How can I fix this? Downloading it from intel just gives me an IPP folder without an include, etc. folder.
↧
Build opencv 3.1 with Visual Studio 2008
I'm trying to build Opencv 3.1 with Visual Studio 2008 but I get some errors as:
- `stdint.h` not found
- `__cpuidex` not defined
- `data()` is not a member function of `std::vector`
Is it possible buld Opencv 3.1 with VS2008? If yes, what do I have to do? If no, which is the last version compatible with VS2008? Thanks!
↧
↧
Built library is twice as large as the distributed one
When I use `cmake` to build `libopencv_java3.so` in release mode with default configuration I got a library of **17MB**
I can reduce that to **10MB** by adding some flags and disabling some modules.
cmake -DBUILD_opencv_videostab=OFF \
-DBUILD_ANDROID_EXAMPLES=OFF \
-DBUILD_opencv_stitching=OFF \
-DBUILD_opencv_tracking=OFF \
-DBUILD_opencv_datasets=OFF \
-DBUILD_opencv_nonfree=OFF \
-DBUILD_opencv_contrib=OFF \
-DBUILD_opencv_legacy=OFF \
-DBUILD_opencv_world=OFF \
-DBUILD_opencv_photo=OFF \
-DBUILD_opencv_apps=OFF \
-DBUILD_opencv_ts=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_SAMPLES=OFF \
-DWITH_CUDA=OFF \
...
-DCMAKE_C_FLAGS_RELEASE="-Os -DNDEBUG -fvisibility=hidden -ffunction-sections -fstack-protector-all" \
-DCMAKE_CXX_FLAGS_RELEASE="-Os -DNDEBUG -fvisibility=hidden -ffunction-sections -fstack-protector-all - fvisibility-inlines-hidden" \
-DBUILD_WITH_DEBUG_INFO=OFF \
...
But the distributed library available in opencv-3.2.0-android-sdk.zip is **8.6MB** large !
How can I get a library of that size ?
↧
build OpenCV 3.1 for android with openCL support
Hi All!
I tried OpenCL on my OpenCV project and the result is a huge improvement in terms of performance so I would like to try OpenCL on android.
I use this [article](http://docs.opencv.org/3.1.0/d7/dbd/tutorial_android_ocl_intro.html) to guide me.
Here is my cmake command:
cmake -GNinja -DCMAKE_MAKE_PROGRAM="/usr/bin/ninja" -DCMAKE_TOOLCHAIN_FILE="../opencv-3.1.0/platforms/android/android.toolchain.cmake" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DWITH_OPENCL=YES -DANDROID_ABI="armeabi-v7a" ../opencv-3.1.0
and I use this command
ninja install/strip
I have no errors neither on compilation nor installation. And an `install` folder has been created. I think all is perfectly fine except that I can't find the `libopencv_java3.so` file !!!!! so:
1. Do you know how I can generate libopencv_java3.so ?
2. Do you know how I can target several abis ? I tried `-DANDROID_ABI="armeabi-v7a" -DANDROID_ABI="x86"` and `-DANDROID_ABI="armeabi-v7a x86"` but it is not correct.
Thank you !
↧
How to compile opencv with local libpng version?
I'm on a ubuntu-like Linux machine without root access. I have a local version of libpng-1.6.26 that I installed in my home account (the default libpng is libpng12). I successfully built opencv-2.4.13 with a cmake command that explicitly referenced my local libpng:
cmake -DPNG_INCLUDE_DIR=/home/tmpguest/INSTALL/libpng/install -DPNG_LIBRARY_RELEASE=/home/tmpguest/INSTALL/libpng/lib/libpng16.so ../
I built my other software, but then the problem occurs. When I try to run my software, I get this complaint:
libpng warning: Application built with libpng-1.5.14 but running with 1.6.26
This is confusing to me. I run 'ldd' on some of the opencv libraries and I see both libpng-1.6.26 and libpng12:
libpng16.so.16 => /home/tmpguest/INSTALL/libpng/lib/libpng16.so.16 (0x00007fffe9944000)
libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x00007fffe45ff000)
So, where does the libpng-1.5.14 warning come from? I think the libpng12 comes from other libraries that opencv is linked with (libcairo), but I don't know where the libpng-1.5.14 warning comes from. However, source code for libpng version 1.5.12 is included in my opencv tarball (from github) in the opencv-2.4.13/3rdparty directory, but I did not build it explicitly. Is that where the libpng-1.5.14 warning comes from?
How can I fix this problem? I think I need to build opencv libraries that only link in one libpng library to get rid of the multiple libpng warning.
↧
Error building opencv with extra modules in Visual Studio
I have configured and generated opencv 3.2 with extra modules on CMAKE successfully using a 32-bit compiler of Visual Studio 2015 (vs14). However, when building this project in Visual Studio I get several errors.
Below, you could find: small sample of the errors, the CMake ouput , the set of all errors,
**Error Sample**
LNK1120 50 unresolved externals opencv_hdf C:\OpenCV3_02_Custom\build\bin\Debug\opencv_hdf320d.dll 1
LNK1112 module machine type 'x64' conflicts with target machine type 'X86' opencv_python3 C:\OpenCV3_02_Custom\build\modules\python3\python35.lib(python35.dll) 1
**CMake Ouput:**
FP16: Compiler support is available
found IPP (ICV version): 9.0.1 [9.0.1]
at: C:/OpenCV3_02_Custom/build/3rdparty/ippicv/ippicv_win
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Found PythonInterp: C:/Users/Ibrahim/Anaconda3/python.exe (found suitable version "3.5.2", minimum required is "2.7")
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
Caffe: NO
Protobuf: NO
Glog: NO
freetype2: NO
harfbuzz: NO
CMake Warning at C:/OpenCV3_Custom/source/opencv_contrib/modules/matlab/CMakeLists.txt:58 (message):
Your compiler is 32-bit but your version of Matlab is 64-bit. To build
Matlab bindings, please switch to a 64-bit compiler.
Call Stack (most recent call first):
C:/OpenCV3_Custom/source/opencv_contrib/modules/matlab/CMakeLists.txt:67 (warn_mixed_precision)
Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
Tesseract: NO
Check contents of vgg_generated_48.i ...
Check contents of vgg_generated_64.i ...
Check contents of vgg_generated_80.i ...
Check contents of vgg_generated_120.i ...
Check contents of boostdesc_bgm.i ...
Check contents of boostdesc_bgm_bi.i ...
Check contents of boostdesc_bgm_hd.i ...
Check contents of boostdesc_binboost_064.i ...
Check contents of boostdesc_binboost_128.i ...
Check contents of boostdesc_binboost_256.i ...
Check contents of boostdesc_lbgm.i ...
General configuration for OpenCV 3.2.0 =====================================
Version control: unknown
Extra modules:
Location (extra): C:/OpenCV3_Custom/source/opencv_contrib/modules
Version control (extra): unknown
Platform:
Timestamp: 2017-02-28T15:51:02Z
Host: Windows 10.0.14393 AMD64
CMake: 3.7.1
CMake generator: Visual Studio 14 2015
CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
MSVC: 1900
C/C++:
Built as dynamic libs?: YES
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe (ver 19.0.23506.0)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /MD /O2 /Ob2 /DNDEBUG /Zi
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP4 /MD /O2 /Ob2 /DNDEBUG /Zi
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug
Linker flags (Debug): /machine:X86 /debug /INCREMENTAL
ccache: NO
Precompiled headers: YES
Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32 C:/Users/Ibrahim/Anaconda3/Library/lib/hdf5.lib
3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf libprotobuf
OpenCV modules:
To be built: core flann hdf imgproc ml photo reg surface_matching video dnn fuzzy imgcodecs shape videoio highgui objdetect plot superres ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo tracking videostab xfeatures2d ximgproc aruco optflow phase_unwrapping stitching structured_light python3
Disabled: world contrib_world
Disabled by dependency: -
Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 viz cnn_3dobj cvv freetype matlab sfm
Windows RT support: NO
GUI:
QT: NO
Win32 UI: YES
OpenGL support: NO
VTK support: NO
Media I/O:
ZLib: build (ver 1.2.8)
JPEG: build (ver 90)
WEBP: build (ver 0.3.1)
PNG: build (ver 1.6.24)
TIFF: build (ver 42 - 4.0.2)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
GDAL: NO
GDCM: NO
Video I/O:
Video for Windows: YES
DC1394 1.x: NO
DC1394 2.x: NO
FFMPEG: YES (prebuilt binaries)
avcodec: YES (ver 57.64.101)
avformat: YES (ver 57.56.100)
avutil: YES (ver 55.34.100)
swscale: YES (ver 4.2.100)
avresample: YES (ver 3.1.0)
GStreamer: NO
OpenNI: NO
OpenNI PrimeSensor Modules: NO
OpenNI2: NO
PvAPI: NO
GigEVisionSDK: NO
DirectShow: YES
Media Foundation: NO
XIMEA: NO
Intel PerC: NO
Parallel framework: Concurrency
Other third-party libraries:
Use IPP: 9.0.1 [9.0.1]
at: C:/OpenCV3_02_Custom/build/3rdparty/ippicv/ippicv_win
Use IPP Async: NO
Use Lapack: NO
Use Eigen: NO
Use Cuda: NO
Use OpenCL: YES
Use OpenVX: NO
Use custom HAL: NO
OpenCL:
Include path: C:/OpenCV3_02_Custom/source/opencv/3rdparty/include/opencl/1.2
Use AMDFFT: NO
Use AMDBLAS: NO
Python 2:
Interpreter: NO
Python 3:
Interpreter: C:/Users/Ibrahim/Anaconda3/python.exe (ver 3.5.2)
Libraries: C:/Users/Ibrahim/Anaconda3/libs/python35.lib (ver 3.5.2)
numpy: C:/Users/Ibrahim/Anaconda3/lib/site-packages/numpy/core/include (ver 1.11.1)
packages path: C:/Users/Ibrahim/Anaconda3/Lib/site-packages
Python (for build): C:/Users/Ibrahim/Anaconda3/python.exe
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Matlab:
mex: C:/Program Files/MATLAB/R2016a/bin/mex.bat
Compiler/generator: Not working (bindings will not be generated)
Documentation:
Doxygen: NO
Tests and samples:
Tests: NO
Performance tests: NO
C/C++ Examples: YES
Install path: C:/OpenCV3_02_Custom/build/install
cvconfig.h is in: C:/OpenCV3_02_Custom/build
-----------------------------------------------------------------
Configuring done
Generating done
**All Erros in Visual Studio:**
Code Description Project File Line Suppression State
LNK2019 unresolved external symbol __imp__H5open referenced in function "private: int __thiscall cv::hdf::HDF5Impl::GetCVtype(int)const " (?GetCVtype@HDF5Impl@hdf@cv@@ABEHH@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5check_version referenced in function "public: __thiscall cv::hdf::HDF5Impl::HDF5Impl(class cv::String)" (??0HDF5Impl@hdf@cv@@QAE@VString@2@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Tcreate referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::kpcreate(int,class cv::String,int,int)const " (?kpcreate@HDF5Impl@hdf@cv@@UBEXHVString@3@HH@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Tclose referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Tequal referenced in function "private: int __thiscall cv::hdf::HDF5Impl::GetCVtype(int)const " (?GetCVtype@HDF5Impl@hdf@cv@@ABEHH@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Tinsert referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::kpcreate(int,class cv::String,int,int)const " (?kpcreate@HDF5Impl@hdf@cv@@UBEXHVString@3@HH@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Tarray_create2 referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Tget_array_dims2 referenced in function "public: virtual int __thiscall cv::hdf::HDF5Impl::dsgettype(class cv::String)const " (?dsgettype@HDF5Impl@hdf@cv@@UBEHVString@3@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Tget_super referenced in function "public: virtual int __thiscall cv::hdf::HDF5Impl::dsgettype(class cv::String)const " (?dsgettype@HDF5Impl@hdf@cv@@UBEHVString@3@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Tget_class referenced in function "public: virtual int __thiscall cv::hdf::HDF5Impl::dsgettype(class cv::String)const " (?dsgettype@HDF5Impl@hdf@cv@@UBEHVString@3@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Tget_native_type referenced in function "public: virtual int __thiscall cv::hdf::HDF5Impl::dsgettype(class cv::String)const " (?dsgettype@HDF5Impl@hdf@cv@@UBEHVString@3@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Lexists referenced in function "public: virtual bool __thiscall cv::hdf::HDF5Impl::hlexists(class cv::String)const " (?hlexists@HDF5Impl@hdf@cv@@UBE_NVString@3@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Dcreate2 referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Dopen2 referenced in function "public: virtual class std::vector> __thiscall cv::hdf::HDF5Impl::dsgetsize(class cv::String,int)const " (?dsgetsize@HDF5Impl@hdf@cv@@UBE?AV?$vector@HV?$allocator@H@std@@@std@@VString@3@H@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Dclose referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Dget_space referenced in function "public: virtual class std::vector> __thiscall cv::hdf::HDF5Impl::dsgetsize(class cv::String,int)const " (?dsgetsize@HDF5Impl@hdf@cv@@UBE?AV?$vector@HV?$allocator@H@std@@@std@@VString@3@H@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Dget_type referenced in function "public: virtual int __thiscall cv::hdf::HDF5Impl::dsgettype(class cv::String)const " (?dsgettype@HDF5Impl@hdf@cv@@UBEHVString@3@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Dget_create_plist referenced in function "public: virtual class std::vector> __thiscall cv::hdf::HDF5Impl::dsgetsize(class cv::String,int)const " (?dsgetsize@HDF5Impl@hdf@cv@@UBE?AV?$vector@HV?$allocator@H@std@@@std@@VString@3@H@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Dread referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dsread(class cv::_OutputArray const &,class cv::String,int const *,int const *)const " (?dsread@HDF5Impl@hdf@cv@@UBEXABV_OutputArray@3@VString@3@PBH2@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Dwrite referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dsinsert(class cv::_InputArray const &,class cv::String,int const *,int const *)const " (?dsinsert@HDF5Impl@hdf@cv@@UBEXABV_InputArray@3@VString@3@PBH2@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Dextend referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dsinsert(class cv::_InputArray const &,class cv::String,int const *,int const *)const " (?dsinsert@HDF5Impl@hdf@cv@@UBEXABV_InputArray@3@VString@3@PBH2@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Eget_auto2 referenced in function "public: __thiscall cv::hdf::HDF5Impl::HDF5Impl(class cv::String)" (??0HDF5Impl@hdf@cv@@QAE@VString@2@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Eset_auto2 referenced in function "public: __thiscall cv::hdf::HDF5Impl::HDF5Impl(class cv::String)" (??0HDF5Impl@hdf@cv@@QAE@VString@2@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Fis_hdf5 referenced in function "public: __thiscall cv::hdf::HDF5Impl::HDF5Impl(class cv::String)" (??0HDF5Impl@hdf@cv@@QAE@VString@2@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Fcreate referenced in function "public: __thiscall cv::hdf::HDF5Impl::HDF5Impl(class cv::String)" (??0HDF5Impl@hdf@cv@@QAE@VString@2@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Fopen referenced in function "public: __thiscall cv::hdf::HDF5Impl::HDF5Impl(class cv::String)" (??0HDF5Impl@hdf@cv@@QAE@VString@2@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Fclose referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::close(void)" (?close@HDF5Impl@hdf@cv@@UAEXXZ) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Gcreate2 referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::grcreate(class cv::String)" (?grcreate@HDF5Impl@hdf@cv@@UAEXVString@3@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Gclose referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::grcreate(class cv::String)" (?grcreate@HDF5Impl@hdf@cv@@UAEXVString@3@@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Pcreate referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Pclose referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Pset_deflate referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Pget_layout referenced in function "public: virtual class std::vector> __thiscall cv::hdf::HDF5Impl::dsgetsize(class cv::String,int)const " (?dsgetsize@HDF5Impl@hdf@cv@@UBE?AV?$vector@HV?$allocator@H@std@@@std@@VString@3@H@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Pset_chunk referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Pget_chunk referenced in function "public: virtual class std::vector> __thiscall cv::hdf::HDF5Impl::dsgetsize(class cv::String,int)const " (?dsgetsize@HDF5Impl@hdf@cv@@UBE?AV?$vector@HV?$allocator@H@std@@@std@@VString@3@H@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Screate_simple referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Sclose referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dscreate(int,int const *,int,class cv::String,int,int const *)const " (?dscreate@HDF5Impl@hdf@cv@@UBEXHPBHHVString@3@H0@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Sget_simple_extent_ndims referenced in function "public: virtual class std::vector> __thiscall cv::hdf::HDF5Impl::dsgetsize(class cv::String,int)const " (?dsgetsize@HDF5Impl@hdf@cv@@UBE?AV?$vector@HV?$allocator@H@std@@@std@@VString@3@H@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Sget_simple_extent_dims referenced in function "public: virtual class std::vector> __thiscall cv::hdf::HDF5Impl::dsgetsize(class cv::String,int)const " (?dsgetsize@HDF5Impl@hdf@cv@@UBE?AV?$vector@HV?$allocator@H@std@@@std@@VString@3@H@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2019 unresolved external symbol __imp__H5Sselect_hyperslab referenced in function "public: virtual void __thiscall cv::hdf::HDF5Impl::dsinsert(class cv::_InputArray const &,class cv::String,int const *,int const *)const " (?dsinsert@HDF5Impl@hdf@cv@@UBEXABV_InputArray@3@VString@3@PBH2@Z) opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5T_NATIVE_SCHAR_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5T_NATIVE_UCHAR_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5T_NATIVE_SHORT_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5T_NATIVE_USHORT_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5T_NATIVE_INT_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5T_NATIVE_FLOAT_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5T_NATIVE_DOUBLE_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5T_NATIVE_INT32_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5P_CLS_DATASET_CREATE_ID_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
LNK2001 unresolved external symbol __imp__H5P_CLS_LINK_ACCESS_ID_g opencv_hdf C:\OpenCV3_02_Custom\build\modules\hdf\hdf5.obj 1
Warning LNK4272 library machine type 'x64' conflicts with target machine type 'X86' opencv_hdf C:\Users\Ibrahim\Anaconda3\Library\lib\hdf5.lib 1
LNK1120 50 unresolved externals opencv_hdf C:\OpenCV3_02_Custom\build\bin\Debug\opencv_hdf320d.dll 1
LNK1112 module machine type 'x64' conflicts with target machine type 'X86' opencv_python3 C:\OpenCV3_02_Custom\build\modules\python3\python35.lib(python35.dll) 1
↧
↧
Issue with build on symbols OpenCV 3.2.0 / VS2015 / Release (x64)
Hey all
I've been hitting a problem for a couple of days now of getting OpenCV to run within a project with VS2015 but am having library linking problems.
Specifically, I'm the maintainer of the ofxCvMin addon for openFrameworks, and am currently trying to upgrade the libraries from 2.4.x to 3.2.0. (I've built and linked opencv libs a few times for windows and osx over the years).
I can successfully build Debug and Release libs (this wasn't an issue at all).
(note : current setup is static libs, not using static CRT)
I managed to build an application linking the debug libraries (with a little extra help on #opencv IRC), but Release is still is not working. **VC++ doesn't seem to recognise the imported symbols**.
Diggiging deeper, it seems that the C++ application is looking for :
?deallocate@Mat@cv@@QAEXXZ
public: void __thiscall cv::Mat::deallocate(void)
when building. But in `opencv_core320.lib` we have:
?deallocate@Mat@cv@@QEAAXXZ
public: void __cdecl cv::Mat::deallocate(void) __ptr64
which VC++ doesn't consider to be a compatible symbol. I presume there are some project settings which affect the symbol naming strategy (__thiscall <> __cdecl hints at a C++ vs C style).
Is anybody aware of project settings which affect how the symbols are decorated when using OpenCV with VC++?
Thank you
NB : CMAKE is not an option here as the projects/solutions need to be openFrameworks generated (although could be used to look into which build settings are present)
↧
Linking error when building OpenCV 3.2.0 with Python support
I build OpenCV 3.2.0 from the sources (including the contrib modules) using the `3.2.0` branch. And when I import it within python, through `import cv2`, I get an `undefined symbol` error. That in my experience seems like a linking error.
$ python
Python 2.7.12+ (default, Sep 17 2016, 12:08:02)
[GCC 6.2.0 20160914] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "", line 1, in
ImportError: /usr/local/lib/python2.7/dist-packages/cv2.so: undefined symbol: _Z13pyopencv_fromIN2cv4MatxIdLi4ELi4EEEEP7_objectRKT_>>>
$ python3
Python 3.5.2+ (default, Sep 22 2016, 12:18:14)
[GCC 6.2.0 20160927] on linux
Type "help", "copyright", "credits" or "license" for more information.>>> import cv2
Traceback (most recent call last):
File "", line 1, in
ImportError: /usr/local/lib/python3.5/dist-packages/cv2.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _Z13pyopencv_fromIN2cv4MatxIdLi4ELi4EEEEP7_objectRKT_>>>
My `gcc`
$ gcc --version
gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
My flags in `cmake` are as follows:
cmake \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
-D WITH_TBB=ON \
-D WITH_QT=ON \
-D WITH_OPENGL=ON \
-D BUILD_TIFF=ON \
-D BUILD_SHARED_LIBS=OFF \
-D BUILD_EXAMPLES=ON \
..
I see in other posts that the problem my be due to the sharing libraries, and so I tried with `-D BUILD_SHARED_LIBS=OFF` but that doesn't work either.
Let me know if you need more information. Any help is appreciated.
↧
opengl_interop.o build error
I recently started to use OpenCV on Qt Creator 4.2.1. Now I am trying to run opengl_interop.cpp from samples/opengl but I am getting this error: **opengl_interop.o: undefined reference to symbol '_ZN2cv3ogl13unmapGLBufferERNS_4UMatE'**.
OS is Ubuntu 16.10.
ProjectTest.pro looks like this:
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += \
../../../../../../Downloads/opencv/opencv/samples/opengl/opengl_interop.cpp
INCLUDEPATH += "/usr/local/include"
LIBS += -L"/usr/lib/x86_64-linux-gnu/" -L"/usr/local/lib"
QMAKE_RPATHDIR += "/opt/Qt/5.8/gcc_64/lib"
LIBS += `pkg-config --libs opencv` -lGLU -lGL -lglut -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core
HEADERS += \
../../../../../../Downloads/opencv/opencv/samples/opengl/winapp.hpp
Compile output log
20:33:29: Running steps for project ProjectTest...
20:33:29: Configuration unchanged, skipping qmake step.
20:33:29: Starting: "/usr/bin/make"
/opt/Qt/5.8/gcc_64/bin/qmake -o Makefile ../ProjectTest/ProjectTest.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
g++ -Wl,-rpath,/opt/Qt/5.8/gcc_64/lib -o ProjectTest opengl_interop.o -L/usr/lib/x86_64-linux-gnu/ -L/usr/local/lib `pkg-config --libs opencv` -lGLU -lGL -lglut -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core
/usr/bin/ld: warning: libopencv_imgproc.so.3.2, needed by /usr/local/lib/libopencv_videoio.so, may conflict with libopencv_imgproc.so.2.4
/usr/bin/ld: warning: libopencv_core.so.3.2, needed by /usr/local/lib/libopencv_videoio.so, may conflict with libopencv_core.so.2.4
Makefile:227: recipe for target 'ProjectTest' failed
//usr/bin/ld: opengl_interop.o: undefined reference to symbol '_ZN2cv3ogl13unmapGLBufferERNS_4UMatE'
//usr/local/lib/libopencv_core.so.3.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [ProjectTest] Error 1
20:33:30: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project ProjectTest (kit: Desktop Qt 5.8.0 GCC 64bit)
When executing step "Make"
20:33:30: Elapsed time: 00:01.
↧