我来自mechE背景,所以我可能会遗漏一些完全无足轻重的东西。我在mac(OS X 10.7 Lion)上使用this使用Unix makefile安装了openCV2.4.1。每次正确使用make
和sudo make install
,所有.dylib文件都在 lib 文件夹中,但我找不到头文件(“cv.h”等) 。)任何地方。 include 文件夹只有cmake_install.cmake,Makefile文件和 CMakeFiles 文件夹。
我之前通过自制程序安装了openCV 2.3.1,并且标题都在include中,因此我必须在库搜索路径中将该路径添加到XCode。现在我不确定如何在没有它的情况下使用该库......?
修改的
我正在使用CMake 2.8.4 GUI。它指定“源代码在哪里”和“在哪里构建二进制文件”。我正在查找我为“在哪里构建二进制文件”指定的文件夹。既然你提到了它,我检查了源代码文件夹并找到了标题,但当然没有.dylib文件....
无论如何,我再次运行CMake(到另一个二进制文件夹,但应该是相同的输出)来获取输出,这里是:
The CXX compiler identification is Clang
The C compiler identification is GNU
Check for working CXX compiler: /usr/bin/c++
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Checking whether C compiler has -isysroot
Checking whether C compiler has -isysroot - yes
Checking whether C compiler supports OSX deployment target flag
Checking whether C compiler supports OSX deployment target flag - yes
Check for working C compiler: /usr/bin/gcc
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Extracting svn version, please wait...
SVNVERSION: exported
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of off64_t
Check size of off64_t - failed
Looking for fseeko
Looking for fseeko - found
Looking for unistd.h
Looking for unistd.h - found
Looking for assert.h
Looking for assert.h - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for io.h
Looking for io.h - not found
Looking for jbg_newlen
Looking for jbg_newlen - not found
Looking for mmap
Looking for mmap - found
Looking for search.h
Looking for search.h - found
Looking for string.h
Looking for string.h - found
Looking for unistd.h
Looking for unistd.h - found
checking for module 'libdc1394-2'
package 'libdc1394-2' not found
checking for module 'libdc1394'
package 'libdc1394' not found
checking for module 'libavcodec'
package 'libavcodec' not found
checking for module 'libavformat'
package 'libavformat' not found
checking for module 'libavutil'
package 'libavutil' not found
checking for module 'libswscale'
package 'libswscale' not found
Looking for libavformat/avformat.h
Looking for libavformat/avformat.h - not found
Looking for ffmpeg/avformat.h
Looking for ffmpeg/avformat.h - not found
CUDA_TOOLKIT_ROOT_DIR not found or specified
Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "4.1")
Found PythonInterp: /usr/bin/python2.7 (Required is at least version "2.0")
Found PythonLibs: /usr/lib/libpython2.7.dylib (Required is at least version "2.7.1")
General configuration for OpenCV 2.4.1 =====================================
Platform:
Host: Darwin 11.4.0 i386
CMake: 2.8.4
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release
C/C++:
Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++
C++ flags (Release): -O3 -DNDEBUG
C++ flags (Debug): -g
C Compiler: /usr/bin/gcc
C flags (Release): -O3 -DNDEBUG
C flags (Debug): -g
Linker flags (Release):
Linker flags (Debug):
OpenCV modules:
To be built: calib3d contrib core features2d flann gpu highgui imgproc legacy ml nonfree objdetect photo python stitching ts video videostab
Disabled: -
Disabled by dependency: -
Unavailable: androidcamera java
GUI:
QT 4.x: NO
Cocoa: YES
OpenGL support: NO
Media I/O:
ZLib: build (ver 1.2.6)
JPEG: build (ver 62)
PNG: build (ver 1.5.9)
TIFF: build (ver 42)
JPEG 2000: build (ver 1.900.1)
OpenEXR: NO
Video I/O:
DC1394 1.x: NO
DC1394 2.x: NO
FFMPEG: NO
codec: NO
format: NO
util: NO
swscale: NO
gentoo-style: NO
OpenNI: NO
OpenNI PrimeSensor Modules: NO
PvAPI: NO
QuickTime: NO
QTKit: YES
Other third-party libraries:
Use IPP: NO
Use TBB: NO
Use Cuda: NO
Use Eigen: NO
Python:
Interpreter: /usr/bin/python2.7 (ver 2.7.1)
Libraries: /usr/lib/libpython2.7.dylib
numpy: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include (ver 1.5.1)
packages path: lib/python2.7/site-packages
Documentation:
Build Documentation: NO
Sphinx: NO
PdfLaTeX compiler: NO
Tests and samples:
Tests: YES
Performance tests: YES
Examples: NO
Install path: /usr/local
cvconfig.h is in: /Users/steveheim/Documents/opencvtest
-----------------------------------------------------------------
Configuring done
答案 0 :(得分:0)
从您的CMake输出:
安装路径:/ usr / local
这意味着在执行make install
后,OpenCV标头将被复制到/usr/local/include/
要更改此位置,您可以将CMAKE_INSTALL_PREFIX
CMake变量的值设置/修改为所需位置。