无法导入外部库



我一直在跟踪那个链接中的说明。我下载了存储库。然后,我应用了这些命令:

cd C:OpenCV3.0.0opencvbuild 
cmake -DOPENCV_EXTRA_MODULES_PATH=C:opencv_contrib-mastermodules C:OpenCV3.0.0opencvsources

它创建了一个包含大量错误的CMakeError.txt文件。

相关部分:

Build FAILED.
"C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_93c95.vcxproj" (default target) (1) ->
(Link target) -> 
  CheckFunctionExists.obj : error LNK2019: unresolved external symbol _fseeko referenced in function _main [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_93c95.vcxproj]
  C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpDebugcmTC_93c95.exe : fatal error LNK1120: 1 unresolved externals [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_93c95.vcxproj]
    0 Warning(s)
    2 Error(s)

Build FAILED.
"C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_6e125.vcxproj" (default target) (1) ->
(ClCompile target) -> 
  C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpCheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_6e125.vcxproj]
    0 Warning(s)
    1 Error(s)

Build FAILED.
"C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_3a774.vcxproj" (default target) (1) ->
(ClCompile target) -> 
  C:OpenCV3.0.0opencvbuildCMakeFilesCheckTypeSizeOFF64_T.c(19): error C2065: 'off64_t' : undeclared identifier [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_3a774.vcxproj]
  C:OpenCV3.0.0opencvbuildCMakeFilesCheckTypeSizeOFF64_T.c(20): error C2065: 'off64_t' : undeclared identifier [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_3a774.vcxproj]
  C:OpenCV3.0.0opencvbuildCMakeFilesCheckTypeSizeOFF64_T.c(21): error C2065: 'off64_t' : undeclared identifier [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_3a774.vcxproj]
  C:OpenCV3.0.0opencvbuildCMakeFilesCheckTypeSizeOFF64_T.c(22): error C2065: 'off64_t' : undeclared identifier [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_3a774.vcxproj]
  C:OpenCV3.0.0opencvbuildCMakeFilesCheckTypeSizeOFF64_T.c(23): error C2065: 'off64_t' : undeclared identifier [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_3a774.vcxproj]
    0 Warning(s)
    5 Error(s)

Build FAILED.
"C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_0f669.vcxproj" (default target) (1) ->
(Link target) -> 
  CheckFunctionExists.obj : error LNK2019: unresolved external symbol _jbg_newlen referenced in function _main [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_0f669.vcxproj]
  C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpDebugcmTC_0f669.exe : fatal error LNK1120: 1 unresolved externals [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_0f669.vcxproj]
    0 Warning(s)
    2 Error(s)

Build FAILED.
"C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_2f0ec.vcxproj" (default target) (1) ->
(Link target) -> 
  CheckFunctionExists.obj : error LNK2019: unresolved external symbol _mmap referenced in function _main [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_2f0ec.vcxproj]
  C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpDebugcmTC_2f0ec.exe : fatal error LNK1120: 1 unresolved externals [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_2f0ec.vcxproj]
    0 Warning(s)
    2 Error(s)

Build FAILED.
"C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_4b3e8.vcxproj" (default target) (1) ->
(ClCompile target) -> 
  C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpCheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [C:OpenCV3.0.0opencvbuildCMakeFilesCMakeTmpcmTC_4b3e8.vcxproj]
    0 Warning(s)
    1 Error(s)

我正在使用Visual Studio 2013和c++与OpenCV3.0.0编码。

请重新解压opencv,并按照以下两个链接的步骤操作:

在Windows 8上安装OpenCV 3.0

使用openCV创建Visual Studio(2013)项目

相关内容

  • 没有找到相关文章

最新更新