2015-07-10 118 views
1

我跟蹤了該指令link中的說明。我下載了存儲庫。然後,我應用了這些命令:無法導入外部庫

cd C:\OpenCV3.0.0\opencv\build 
cmake -DOPENCV_EXTRA_MODULES_PATH=C:\opencv_contrib-master\modules C:\OpenCV3.0.0\opencv\sources 

它創建了一個CMakeError.txt文件包括大量的錯誤。

相關零件:

Build FAILED. 

"C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_93c95.vcxproj" (default target) (1) -> 

(Link target) -> 

    CheckFunctionExists.obj : error LNK2019: unresolved external symbol _fseeko referenced in function _main [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_93c95.vcxproj] 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\Debug\cmTC_93c95.exe : fatal error LNK1120: 1 unresolved externals [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_93c95.vcxproj] 

    0 Warning(s) 

    2 Error(s) 


Build FAILED. 

"C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_6e125.vcxproj" (default target) (1) -> 

(ClCompile target) -> 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_6e125.vcxproj] 

    0 Warning(s) 

    1 Error(s) 


Build FAILED. 

"C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_3a774.vcxproj" (default target) (1) -> 

(ClCompile target) -> 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CheckTypeSize\OFF64_T.c(19): error C2065: 'off64_t' : undeclared identifier [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_3a774.vcxproj] 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CheckTypeSize\OFF64_T.c(20): error C2065: 'off64_t' : undeclared identifier [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_3a774.vcxproj] 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CheckTypeSize\OFF64_T.c(21): error C2065: 'off64_t' : undeclared identifier [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_3a774.vcxproj] 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CheckTypeSize\OFF64_T.c(22): error C2065: 'off64_t' : undeclared identifier [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_3a774.vcxproj] 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CheckTypeSize\OFF64_T.c(23): error C2065: 'off64_t' : undeclared identifier [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_3a774.vcxproj] 

    0 Warning(s) 

    5 Error(s) 



Build FAILED. 

"C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_0f669.vcxproj" (default target) (1) -> 

(Link target) -> 

    CheckFunctionExists.obj : error LNK2019: unresolved external symbol _jbg_newlen referenced in function _main [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_0f669.vcxproj] 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\Debug\cmTC_0f669.exe : fatal error LNK1120: 1 unresolved externals [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_0f669.vcxproj] 

    0 Warning(s) 

    2 Error(s) 



Build FAILED. 

"C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_2f0ec.vcxproj" (default target) (1) -> 

(Link target) -> 

    CheckFunctionExists.obj : error LNK2019: unresolved external symbol _mmap referenced in function _main [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_2f0ec.vcxproj] 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\Debug\cmTC_2f0ec.exe : fatal error LNK1120: 1 unresolved externals [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_2f0ec.vcxproj] 

    0 Warning(s) 

    2 Error(s) 



Build FAILED. 

"C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_4b3e8.vcxproj" (default target) (1) -> 

(ClCompile target) -> 

    C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [C:\OpenCV3.0.0\opencv\build\CMakeFiles\CMakeTmp\cmTC_4b3e8.vcxproj] 

    0 Warning(s) 

    1 Error(s) 

我使用Visual Studio 2013和C++與OpenCV3.0.0編碼。

回答