# Error when trying to generate file using CVmake

**URL:** <https://forum.opencv.org/t/error-when-trying-to-generate-file-using-cvmake/8912>\
**Category:** C++\
**Tags:** build, cmake\
**Created:** [May 25, 2022, 11:33pm UTC](https://forum.opencv.org/t/error-when-trying-to-generate-file-using-cvmake/8912 "2022-05-25T23:33:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![firewontquell](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/firewontquell/32/5317_2.png) [@firewontquell](https://forum.opencv.org/u/firewontquell)\
**Post date:** [May 25, 2022, 11:33pm UTC](https://forum.opencv.org/t/error-when-trying-to-generate-file-using-cvmake/8912/1 "2022-05-25T23:33:39Z")

</div>

I get the error: “Error in configuration process, project files may be invalid.”

I am new with openCV and have been struggling for a few days :-p

I am attempting to install what i believe is the newest openCV (with opencv\_world440.lib ) on a windows machine

My error file is below-- any help would be greatly appreciated!!

> Determining if the function fseeko exists failed with the following output:  
> Change Dir: C:/Users/holdb/OneDrive/Documents/opencv\_build/CMakeFiles/CMakeTmp
> 
> Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC\_44827.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27048 for x64
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> CheckFunctionExists.c
> 
> cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /Oi /D \_MBCS /D WIN32 /D \_WINDOWS /D \_CRT\_SECURE\_NO\_DEPRECATE /D \_CRT\_NONSTDC\_NO\_DEPRECATE /D \_SCL\_SECURE\_NO\_WARNINGS /D CHECK\_FUNCTION\_EXISTS=fseeko /D “CMAKE\_INTDIR="Debug"” /Gm- /RTC1 /MDd /GS /Gy /fp:precise /Zc:wchar\_t /Zc:forScope /Zc:inline /Fo"cmTC\_44827.dir\Debug\" /Fd"cmTC\_44827.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue /bigobj “C:\Program Files\CMake\share\cmake-3.23\Modules\CheckFunctionExists.c”
> 
> CheckFunctionExists.obj : error LNK2019: unresolved external symbol fseeko referenced in function main [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_44827.vcxproj]
> 
> C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\Debug\cmTC\_44827.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_44827.vcxproj]
> 
> Determining size of off64\_t failed with the following output:  
> Change Dir: C:/Users/holdb/OneDrive/Documents/opencv\_build/CMakeFiles/CMakeTmp
> 
> Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC\_b7991.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27048 for x64
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> OFF64\_T.c
> 
> cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /Oi /D \_MBCS /D WIN32 /D \_WINDOWS /D \_CRT\_SECURE\_NO\_DEPRECATE /D \_CRT\_NONSTDC\_NO\_DEPRECATE /D \_SCL\_SECURE\_NO\_WARNINGS /D “CMAKE\_INTDIR="Debug"” /Gm- /RTC1 /MDd /GS /Gy /fp:precise /Zc:wchar\_t /Zc:forScope /Zc:inline /Fo"cmTC\_b7991.dir\Debug\" /Fd"cmTC\_b7991.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue /bigobj C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CheckTypeSize\OFF64\_T.c
> 
> C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CheckTypeSize\OFF64\_T.c(29): error C2065: ‘off64\_t’: undeclared identifier [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_b7991.vcxproj]
> 
> C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CheckTypeSize\OFF64\_T.c(30): error C2065: ‘off64\_t’: undeclared identifier [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_b7991.vcxproj]
> 
> C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CheckTypeSize\OFF64\_T.c(31): error C2065: ‘off64\_t’: undeclared identifier [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_b7991.vcxproj]
> 
> C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CheckTypeSize\OFF64\_T.c(32): error C2065: ‘off64\_t’: undeclared identifier [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_b7991.vcxproj]
> 
> C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CheckTypeSize\OFF64\_T.c(33): error C2065: ‘off64\_t’: undeclared identifier [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_b7991.vcxproj]
> 
> C:/Users/holdb/OneDrive/Documents/opencv\_build/CMakeFiles/CheckTypeSize/OFF64\_T.c:  
> #include \<sys/types.h\>  
> #include \<stdint.h\>  
> #include \<stddef.h\>
> 
> #undef KEY  
> #if defined(\_\_i386)
> 
> # define KEY ‘_‘,’_’,‘i’,‘3’,‘8’,‘6’
> 
> #elif defined(\_\_x86\_64)
> 
> # define KEY ‘_‘,’_’,‘x’,‘8’,‘6’,‘\_’,‘6’,‘4’
> 
> #elif defined( **PPC64** )
> 
> # define KEY ‘_‘,’_’,‘P’,‘P’,‘C’,‘6’,‘4’,‘_‘,’_’
> 
> #elif defined( **ppc64** )
> 
> # define KEY ‘_‘,’_’,‘p’,‘p’,‘c’,‘6’,‘4’,‘_‘,’_’
> 
> #elif defined( **PPC** )
> 
> # define KEY ‘_‘,’_’,‘P’,‘P’,‘C’,‘_‘,’_’
> 
> #elif defined( **ppc** )
> 
> # define KEY ‘_‘,’_’,‘p’,‘p’,‘c’,‘_‘,’_’
> 
> #elif defined( **aarch64** )
> 
> # define KEY ‘_‘,’_’,‘a’,‘a’,‘r’,‘c’,‘h’,‘6’,‘4’,‘_‘,’_’
> 
> #elif defined( **ARM\_ARCH\_7A** )
> 
> # define KEY ‘_‘,’_’,‘A’,‘R’,‘M’,‘_‘,‘A’,‘R’,‘C’,‘H’,’_’,‘7’,‘A’,‘_‘,’_’
> 
> #elif defined( **ARM\_ARCH\_7S** )
> 
> # define KEY ‘_‘,’_’,‘A’,‘R’,‘M’,‘_‘,‘A’,‘R’,‘C’,‘H’,’_’,‘7’,‘S’,‘_‘,’_’
> 
> #endif
> 
> #define SIZE (sizeof(off64\_t))  
> static char info\_size = {‘I’, ‘N’, ‘F’, ‘O’, ‘:’, ‘s’,‘i’,‘z’,‘e’,‘[’,  
> (‘0’ + ((SIZE / 10000)%10)),  
> (‘0’ + ((SIZE / 1000)%10)),  
> (‘0’ + ((SIZE / 100)%10)),  
> (‘0’ + ((SIZE / 10)%10)),  
> (‘0’ + (SIZE % 10)),  
> ‘]’,  
> #ifdef KEY  
> ’ ‘,‘k’,‘e’,‘y’,’[', KEY, ‘]’,  
> #endif  
> ‘\0’};
> 
> #ifdef **CLASSIC\_C**  
> int main(argc, argv) int argc; char \*argv;  
> #else  
> int main(int argc, char \*argv)  
> #endif  
> {  
> int require = 0;  
> require += info\_size[argc];  
> (void)argv;  
> return require;  
> }
> 
> Determining if the function memmove exists failed with the following output:  
> Change Dir: C:/Users/holdb/OneDrive/Documents/opencv\_build/CMakeFiles/CMakeTmp
> 
> Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC\_e2a04.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27048 for x64
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> CheckFunctionExists.c
> 
> cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /Oi /D \_MBCS /D WIN32 /D \_WINDOWS /D \_CRT\_SECURE\_NO\_DEPRECATE /D \_CRT\_NONSTDC\_NO\_DEPRECATE /D \_SCL\_SECURE\_NO\_WARNINGS /D CHECK\_FUNCTION\_EXISTS=memmove /D “CMAKE\_INTDIR="Debug"” /Gm- /RTC1 /MDd /GS /Gy /fp:precise /Zc:wchar\_t /Zc:forScope /Zc:inline /Fo"cmTC\_e2a04.dir\Debug\" /Fd"cmTC\_e2a04.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue /bigobj “C:\Program Files\CMake\share\cmake-3.23\Modules\CheckFunctionExists.c”
> 
> C:\Program Files\CMake\share\cmake-3.23\Modules\CheckFunctionExists.c(7): warning C4391: ‘char memmove(void)’: incorrect return type for intrinsic function, expected ‘void’ [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_e2a04.vcxproj]
> 
> C:\Program Files\CMake\share\cmake-3.23\Modules\CheckFunctionExists.c(7): warning C4392: ‘char memmove(void)’: incorrect number of arguments for intrinsic function, expected ‘3’ arguments [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_e2a04.vcxproj]
> 
> C:\Program Files\CMake\share\cmake-3.23\Modules\CheckFunctionExists.c(17): error C2168: ‘memmove’: too few actual parameters for intrinsic function [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_e2a04.vcxproj]
> 
> Determining if the function strcasecmp exists failed with the following output:  
> Change Dir: C:/Users/holdb/OneDrive/Documents/opencv\_build/CMakeFiles/CMakeTmp
> 
> Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC\_4171d.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27048 for x64
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> CheckFunctionExists.c
> 
> cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /Oi /D \_MBCS /D WIN32 /D \_WINDOWS /D \_CRT\_SECURE\_NO\_DEPRECATE /D \_CRT\_NONSTDC\_NO\_DEPRECATE /D \_SCL\_SECURE\_NO\_WARNINGS /D CHECK\_FUNCTION\_EXISTS=strcasecmp /D “CMAKE\_INTDIR="Debug"” /Gm- /RTC1 /MDd /GS /Gy /fp:precise /Zc:wchar\_t /Zc:forScope /Zc:inline /Fo"cmTC\_4171d.dir\Debug\" /Fd"cmTC\_4171d.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue /bigobj “C:\Program Files\CMake\share\cmake-3.23\Modules\CheckFunctionExists.c”
> 
> CheckFunctionExists.obj : error LNK2019: unresolved external symbol strcasecmp referenced in function main [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_4171d.vcxproj]
> 
> C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\Debug\cmTC\_4171d.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_4171d.vcxproj]
> 
> Build output check failed:  
> Regex: ‘unknown .\*option’  
> Output line: ‘cl : Command line warning D9002: ignoring unknown option ‘-std=c99’ [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_c9904.vcxproj]  
> ’  
> Compilation failed:  
> source file: ‘C:/Users/holdb/OneDrive/Documents/opencv\_build/CMakeFiles/CMakeTmp/src.c’  
> check option: ’ /DWIN32 /D\_WINDOWS /W3 /D \_CRT\_SECURE\_NO\_DEPRECATE /D \_CRT\_NONSTDC\_NO\_DEPRECATE /D \_SCL\_SECURE\_NO\_WARNINGS /Gy /bigobj /Oi /fp:precise /MP -std=c99’  
> ===== BUILD LOG =====  
> Change Dir: C:/Users/holdb/OneDrive/Documents/opencv\_build/CMakeFiles/CMakeTmp
> 
> Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC\_c9904.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27048 for x64
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> src.c
> 
> cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /Oi /D \_MBCS /D WIN32 /D \_WINDOWS /D \_CRT\_SECURE\_NO\_DEPRECATE /D \_CRT\_NONSTDC\_NO\_DEPRECATE /D \_SCL\_SECURE\_NO\_WARNINGS /D “CMAKE\_INTDIR="Debug"” /Gm- /RTC1 /MDd /GS /Gy /fp:precise /Zc:wchar\_t /Zc:forScope /Zc:inline /Fo"cmTC\_c9904.dir\Debug\" /Fd"cmTC\_c9904.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue /bigobj /bigobj -std=c99 C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\src.c
> 
> cl : Command line warning D9002: ignoring unknown option ‘-std=c99’ [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_c9904.vcxproj]
> 
> cmTC\_c9904.vcxproj → C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\Debug\cmTC\_c9904.exe
> 
> ===== END =====
> 
> Determining if the function sgemm\_ exists failed with the following output:  
> Change Dir: C:/Users/holdb/OneDrive/Documents/opencv\_build/CMakeFiles/CMakeTmp
> 
> Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC\_42f88.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27048 for x64
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> CheckFunctionExists.c
> 
> cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /Oi /D \_MBCS /D WIN32 /D \_WINDOWS /D \_CRT\_SECURE\_NO\_DEPRECATE /D \_CRT\_NONSTDC\_NO\_DEPRECATE /D _SCL\_SECURE\_NO\_WARNINGS /D CHECK\_FUNCTION\_EXISTS=sgemm_ /D “CMAKE\_INTDIR="Debug"” /Gm- /RTC1 /MDd /GS /Gy /fp:precise /Zc:wchar\_t /Zc:forScope /Zc:inline /Fo"cmTC\_42f88.dir\Debug\" /Fd"cmTC\_42f88.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue /bigobj “C:\Program Files\CMake\share\cmake-3.23\Modules\CheckFunctionExists.c”
> 
> CheckFunctionExists.obj : error LNK2019: unresolved external symbol sgemm\_ referenced in function main [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_42f88.vcxproj]
> 
> C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\Debug\cmTC\_42f88.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_42f88.vcxproj]
> 
> Determining if the include file pthread.h exists failed with the following output:  
> Change Dir: C:/Users/holdb/OneDrive/Documents/opencv\_build/CMakeFiles/CMakeTmp
> 
> Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC\_56888.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27048 for x64
> 
> Copyright (C) Microsoft Corporation. All rights reserved.
> 
> CheckIncludeFile.c
> 
> cl /c /Zi /W3 /WX- /diagnostics:classic /MP /Od /Ob0 /Oi /D \_MBCS /D WIN32 /D \_WINDOWS /D \_CRT\_SECURE\_NO\_DEPRECATE /D \_CRT\_NONSTDC\_NO\_DEPRECATE /D \_SCL\_SECURE\_NO\_WARNINGS /D “CMAKE\_INTDIR="Debug"” /Gm- /RTC1 /MDd /GS /Gy /fp:precise /Zc:wchar\_t /Zc:forScope /Zc:inline /Fo"cmTC\_56888.dir\Debug\" /Fd"cmTC\_56888.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue /bigobj C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\CheckIncludeFile.c
> 
> C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: ‘pthread.h’: No such file or directory [C:\Users\holdb\OneDrive\Documents\opencv\_build\CMakeFiles\CMakeTmp\cmTC\_56888.vcxproj]

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [May 26, 2022, 4:20am UTC](https://forum.opencv.org/t/error-when-trying-to-generate-file-using-cvmake/8912/2 "2022-05-26T04:20:13Z")

</div>

> [@firewontquell](#):
>
> My error file is below

unfortunately, the error log is not relevant (it’s only internal compiler checks)  
show us the console output from cmake instead, please  
(the one that says: “Error in configuration process, project files may be invalid.”)

> I am attempting to install what i believe is the newest openCV (with opencv\_world440.lib )

not quite, [that would be 4.5.5](https://github.com/opencv/opencv/releases)
