无法导入外部库
Cannot Import External Library
我一直在跟踪那个链接中的说明。我下载了存储库。然后,我应用了这些命令:
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)项目
相关文章:
- 尝试导入pybind-opencv模块时出现libgtk错误
- 导入库可以跨dll版本工作吗
- 在函数内部的声明中初始化数组,并在外部使用它
- 使外部项目可用于find_package CMake
- 建议在运行时将带有类实例的列表从c++导入qml
- 为什么导入Mixed native/CLR lib.dll的本机C++应用程序没有在Mixed lib.dll中的外部变
- Python 3.8:运行外部C++代码:无法导入模块
- 安卓,将外部库导入 NDK
- 链接导入的库与CMAKE外部项目
- 使用 java 类在 C++ 内部导入外部 jarfile
- 宏导入外部函数
- 如何使用GUI将外部库和项目导入到我的C++项目中
- 在 CMake 中导入的外部 msproject 不会生成
- 外部 VS2013 生成错误"错误 MSB4019:找不到导入的项目<path>"
- c#dll导入未解析的外部符号
- 使用外部"C++"导入 DLL
- 外部包导入错误
- SWIG:使用导入的外部类型
- 无法导入外部库
- 错误 LNK2019: 未解析的外部符号"__declspec(DLL导入) 专用