gpt4 book ai didi

c++ - 无法导入外部库

转载 作者:太空宇宙 更新时间:2023-11-04 13:31:22 24 4
gpt4 key购买 nike

我一直在跟踪 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 进行编码。

最佳答案

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

Install OpenCV 3.0 on Windows 8

Create an Visual Studio (2013) Project with openCV

让我知道这是否适合你..

关于c++ - 无法导入外部库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31335991/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com