Cannot Import External Library

asked 2015-07-10 03:17:58 -0500

openman gravatar image

updated 2015-07-10 03:19:09 -0500

I kept track of the instructions in that link. I downloaded the repository. Then, I applied those commands: cd C:\OpenCV3.0.0\opencv\build cmake -DOPENCV_EXTRA_MODULES_PATH=C:\opencv_contrib-master\modules C:\OpenCV3.0.0\opencv\sources It creates an CMakeError.txt file including lots of errors.

Related parts:

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 ...
(more)
edit retag flag offensive close merge delete

Comments

Hmm it seems you are running windows and \ is seen there as an escape character so try this. cmake -DOPENCV_EXTRA_MODULES_PATH=C:\\opencv_contrib-master\\modules\\ C:\\OpenCV3.0.0\\opencv\\source\\ and see what it does.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-07-10 03:28:57 -0500 )edit

Unfortunately, nothing changed.

openman gravatar imageopenman ( 2015-07-10 03:35:46 -0500 )edit

hi openman , any solutions? I met the same errors as you.

the no such unistd.h problem can be just add new file name the unistd.h
contents :

ifndef _UNISTD_H

define _UNISTD_H

include <io.h>

include <process.h>

endif /* _UNISTD_H */

then add it to your /vs path / vc/include dir .

I'm working on the other errors.

09star gravatar image09star ( 2015-12-14 01:44:01 -0500 )edit