which libraries should I link to build opencv 3.2 - c++

Building opencv with contributions using this guide:
http://docs.opencv.org/trunk/d3/d52/tutorial_windows_install.html
instead of cmake gui, i use:
cmake -DOPENCV_EXTRA_MODULES_PATH=E:\work\opencv2\opencv_contrib/modules E:\work\opencv2\opencv
Error build log:
Build output check failed:
Regex: 'unknown .*option'
Output line: 'cl : Command line warning D9002: ignoring unknown option '-fsigned-char' [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7e110.vcxproj]
'
Compilation failed:
source file: 'E:/work/opencv2/build2/CMakeFiles/CMakeTmp/src.cxx'
check option: ' -fsigned-char'
===== BUILD LOG =====
Change Dir: E:/work/opencv2/build2/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_7e110.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 31.05.2017 18:02:59.
Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7e110.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_7e110.dir\Debug\".
Creating directory "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_7e110.dir\Debug\cmTC_7e110.tlog\".
InitializeBuildStatus:
Creating "cmTC_7e110.dir\Debug\cmTC_7e110.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHa /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_7e110.dir\Debug\\" /Fd"cmTC_7e110.dir\Debug\vc140.pdb" /Gd /TP /analyze- /errorReport:queue -fsigned-char E:\work\opencv2\build2\CMakeFiles\CMakeTmp\src.cxx
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHa /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_7e110.dir\Debug\\" /Fd"cmTC_7e110.dir\Debug\vc140.pdb" /Gd /TP /analyze- /errorReport:queue -fsigned-char E:\work\opencv2\build2\CMakeFiles\CMakeTmp\src.cxx
cl : Command line warning D9002: ignoring unknown option '-fsigned-char' [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7e110.vcxproj]
src.cxx
Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_7e110.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"E:/work/opencv2/build2/CMakeFiles/CMakeTmp/Debug/cmTC_7e110.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"E:/work/opencv2/build2/CMakeFiles/CMakeTmp/Debug/cmTC_7e110.lib" /MACHINE:X86 /SAFESEH /machine:X86 cmTC_7e110.dir\Debug\src.obj
cmTC_7e110.vcxproj -> E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_7e110.exe
FinalizeBuildStatus:
Deleting file "cmTC_7e110.dir\Debug\cmTC_7e110.tlog\unsuccessfulbuild".
Touching "cmTC_7e110.dir\Debug\cmTC_7e110.tlog\cmTC_7e110.lastbuildstate".
Done Building Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7e110.vcxproj" (default targets).
Build succeeded.
"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7e110.vcxproj" (default target) (1) ->
(ClCompile target) ->
cl : Command line warning D9002: ignoring unknown option '-fsigned-char' [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7e110.vcxproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.46
===== END =====
Build output check failed:
Regex: 'unknown .*option'
Output line: 'cl : Command line warning D9002: ignoring unknown option '-fsigned-char' [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7535b.vcxproj]
'
Compilation failed:
source file: 'E:/work/opencv2/build2/CMakeFiles/CMakeTmp/src.c'
check option: ' -fsigned-char'
===== BUILD LOG =====
Change Dir: E:/work/opencv2/build2/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_7535b.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 31.05.2017 18:02:59.
Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7535b.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_7535b.dir\Debug\".
Creating directory "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_7535b.dir\Debug\cmTC_7535b.tlog\".
InitializeBuildStatus:
Creating "cmTC_7535b.dir\Debug\cmTC_7535b.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_7535b.dir\Debug\\" /Fd"cmTC_7535b.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue -fsigned-char E:\work\opencv2\build2\CMakeFiles\CMakeTmp\src.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_7535b.dir\Debug\\" /Fd"cmTC_7535b.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue -fsigned-char E:\work\opencv2\build2\CMakeFiles\CMakeTmp\src.c
cl : Command line warning D9002: ignoring unknown option '-fsigned-char' [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7535b.vcxproj]
src.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_7535b.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"E:/work/opencv2/build2/CMakeFiles/CMakeTmp/Debug/cmTC_7535b.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"E:/work/opencv2/build2/CMakeFiles/CMakeTmp/Debug/cmTC_7535b.lib" /MACHINE:X86 /SAFESEH /machine:X86 cmTC_7535b.dir\Debug\src.obj
cmTC_7535b.vcxproj -> E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_7535b.exe
FinalizeBuildStatus:
Deleting file "cmTC_7535b.dir\Debug\cmTC_7535b.tlog\unsuccessfulbuild".
Touching "cmTC_7535b.dir\Debug\cmTC_7535b.tlog\cmTC_7535b.lastbuildstate".
Done Building Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7535b.vcxproj" (default targets).
Build succeeded.
"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7535b.vcxproj" (default target) (1) ->
(ClCompile target) ->
cl : Command line warning D9002: ignoring unknown option '-fsigned-char' [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_7535b.vcxproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.44
===== END =====
Determining if the function fseeko exists failed with the following output:
Change Dir: E:/work/opencv2/build2/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_1ca4b.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 31.05.2017 18:03:11.
Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1ca4b.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_1ca4b.dir\Debug\".
Creating directory "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_1ca4b.dir\Debug\cmTC_1ca4b.tlog\".
InitializeBuildStatus:
Creating "cmTC_1ca4b.dir\Debug\cmTC_1ca4b.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi /W3 /WX- /MP8 /Od /Ob0 /Oi /Oy- /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\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_1ca4b.dir\Debug\\" /Fd"cmTC_1ca4b.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue /bigobj "C:\Program Files\CMake\share\cmake-3.8\Modules\CheckFunctionExists.c"
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /MP8 /Od /Ob0 /Oi /Oy- /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\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_1ca4b.dir\Debug\\" /Fd"cmTC_1ca4b.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue /bigobj "C:\Program Files\CMake\share\cmake-3.8\Modules\CheckFunctionExists.c"
CheckFunctionExists.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_1ca4b.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"E:/work/opencv2/build2/CMakeFiles/CMakeTmp/Debug/cmTC_1ca4b.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"E:/work/opencv2/build2/CMakeFiles/CMakeTmp/Debug/cmTC_1ca4b.lib" /MACHINE:X86 /SAFESEH /machine:X86 cmTC_1ca4b.dir\Debug\CheckFunctionExists.obj
CheckFunctionExists.obj : error LNK2019: unresolved external symbol _fseeko referenced in function _main [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1ca4b.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_1ca4b.exe : fatal error LNK1120: 1 unresolved externals [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1ca4b.vcxproj]
Done Building Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1ca4b.vcxproj" (default targets) -- FAILED.
Build FAILED.
"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1ca4b.vcxproj" (default target) (1) ->
(Link target) ->
CheckFunctionExists.obj : error LNK2019: unresolved external symbol _fseeko referenced in function _main [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1ca4b.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_1ca4b.exe : fatal error LNK1120: 1 unresolved externals [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1ca4b.vcxproj]
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:00.38
Determining size of off64_t failed with the following output:
Change Dir: E:/work/opencv2/build2/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_69866.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 31.05.2017 18:03:11.
Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_69866.dir\Debug\".
Creating directory "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_69866.dir\Debug\cmTC_69866.tlog\".
InitializeBuildStatus:
Creating "cmTC_69866.dir\Debug\cmTC_69866.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi /W3 /WX- /MP8 /Od /Ob0 /Oi /Oy- /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_69866.dir\Debug\\" /Fd"cmTC_69866.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue /bigobj E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /MP8 /Od /Ob0 /Oi /Oy- /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_69866.dir\Debug\\" /Fd"cmTC_69866.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue /bigobj E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c
OFF64_T.c
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(19): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(20): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(21): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(22): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(23): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
Done Building Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj" (default targets) -- FAILED.
Build FAILED.
"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj" (default target) (1) ->
(ClCompile target) ->
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(19): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(20): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(21): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(22): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CheckTypeSize\OFF64_T.c(23): error C2065: 'off64_t': undeclared identifier [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_69866.vcxproj]
0 Warning(s)
5 Error(s)
Time Elapsed 00:00:00.29
E:/work/opencv2/build2/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(__ppc__)
# define KEY '_','_','p','p','c','_','_'
#elif defined(__ppc64__)
# define KEY '_','_','p','p','c','6','4','_','_'
#endif
#define SIZE (sizeof(off64_t))
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 jbg_newlen exists failed with the following output:
Change Dir: E:/work/opencv2/build2/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_c6cb2.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 31.05.2017 18:03:13.
Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_c6cb2.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_c6cb2.dir\Debug\".
Creating directory "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_c6cb2.dir\Debug\cmTC_c6cb2.tlog\".
InitializeBuildStatus:
Creating "cmTC_c6cb2.dir\Debug\cmTC_c6cb2.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi /W3 /WX- /MP8 /Od /Ob0 /Oi /Oy- /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /D CHECK_FUNCTION_EXISTS=jbg_newlen /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_c6cb2.dir\Debug\\" /Fd"cmTC_c6cb2.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue /bigobj "C:\Program Files\CMake\share\cmake-3.8\Modules\CheckFunctionExists.c"
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /MP8 /Od /Ob0 /Oi /Oy- /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /D CHECK_FUNCTION_EXISTS=jbg_newlen /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_c6cb2.dir\Debug\\" /Fd"cmTC_c6cb2.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue /bigobj "C:\Program Files\CMake\share\cmake-3.8\Modules\CheckFunctionExists.c"
CheckFunctionExists.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_c6cb2.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"E:/work/opencv2/build2/CMakeFiles/CMakeTmp/Debug/cmTC_c6cb2.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"E:/work/opencv2/build2/CMakeFiles/CMakeTmp/Debug/cmTC_c6cb2.lib" /MACHINE:X86 /SAFESEH /machine:X86 cmTC_c6cb2.dir\Debug\CheckFunctionExists.obj
CheckFunctionExists.obj : error LNK2019: unresolved external symbol _jbg_newlen referenced in function _main [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_c6cb2.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_c6cb2.exe : fatal error LNK1120: 1 unresolved externals [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_c6cb2.vcxproj]
Done Building Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_c6cb2.vcxproj" (default targets) -- FAILED.
Build FAILED.
"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_c6cb2.vcxproj" (default target) (1) ->
(Link target) ->
CheckFunctionExists.obj : error LNK2019: unresolved external symbol _jbg_newlen referenced in function _main [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_c6cb2.vcxproj]
E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\cmTC_c6cb2.exe : fatal error LNK1120: 1 unresolved externals [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_c6cb2.vcxproj]
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:00.37
Determining if the include file pthread.h exists failed with the following output:
Change Dir: E:/work/opencv2/build2/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_1a06d.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 31.05.2017 18:03:18.
Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1a06d.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_1a06d.dir\Debug\".
Creating directory "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTC_1a06d.dir\Debug\cmTC_1a06d.tlog\".
InitializeBuildStatus:
Creating "cmTC_1a06d.dir\Debug\cmTC_1a06d.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi /W3 /WX- /MP8 /Od /Ob0 /Oi /Oy- /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_1a06d.dir\Debug\\" /Fd"cmTC_1a06d.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue /bigobj E:\work\opencv2\build2\CMakeFiles\CMakeTmp\CheckIncludeFile.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /MP8 /Od /Ob0 /Oi /Oy- /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_1a06d.dir\Debug\\" /Fd"cmTC_1a06d.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue /bigobj E:\work\opencv2\build2\CMakeFiles\CMakeTmp\CheckIncludeFile.c
CheckIncludeFile.c
E:\work\opencv2\build2\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1a06d.vcxproj]
Done Building Project "E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1a06d.vcxproj" (default targets) -- FAILED.
Build FAILED.
"E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1a06d.vcxproj" (default target) (1) ->
(ClCompile target) ->
E:\work\opencv2\build2\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [E:\work\opencv2\build2\CMakeFiles\CMakeTmp\cmTC_1a06d.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.29
which libraries do I miss?
Do I need to add some path variables?
Thank you!

You probably forgot to select the "modules" folder inside the extra contrib folder. Exact error happened to me when I only selected the extra contrib folder.

Related

malloc() call in a DLL compiled with GCC crashes, but works with Visual Studio

I'm trying to compile the following DLL code:
int* ptr;
DLLExport int add(int a, int b)
{
ptr = (int*)malloc(10 * sizeof(int));
free(ptr);
return (a + b + 6);
}
This DLL works fine when compiled with Visual Studio, but crashes on the malloc() call when compiled with mingw/gcc.
However the following code works with both compilers:
DLLExport int add(int a, int b)
{
int* ptr;
ptr = (int*)malloc(10 * sizeof(int));
free(ptr);
return (a + b + 6);
}
It also works with both compilers when I define the var as static, however that var needs to be extern and used in multiple files, so it can't be static. I tried setting it to volatile, but it didn't help.
I'm loading the DLL with Unity and it crashes with the following error:
Received signal SIGSEGV
Stack trace:
RtlLookupFunctionEntry returned NULL function. Aborting stack walk.
0x0000020f7d1669b0 (cygwin1) lfind
0x0000020f7d1c5c6b (cygwin1) acl_get_perm
<Missing stacktrace information>
cygwin1.dll is a dependency that I need to also add for the mingw DLL to be loaded (but I don't need to add any other DLLs when compiling with VC).
This is the Makefile I use for mingw:
all:
g++ -c -o dll.o dll.cpp -O0
g++ -c -o pch.o pch.cpp
g++ -shared -o dll.dll ./dll3.o ./pch.o
My guess is that I'm missing some g++ flags, but I can't figure out which ones (I tried many).
And these are some of the command lines that the VC compiler uses:
1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\CL.exe /c /ZI /JMC /nologo /W3 /WX- /diagnostics:column /sdl /Od /D _DEBUG /D DLL2_EXPORTS /D _WINDOWS /D _USRDLL /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Zc:inline /Yc"pch.h" /Fp"x64\Debug\Dll2.pch" /Fo"x64\Debug\\" /Fd"x64\Debug\vc142.pdb" /external:W3 /Gd /TP /FC /errorReport:prompt pch.cpp
...
1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Tracker.exe /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i ...\Dll2\x64\Debug\Dll2.tlog /r ...\DLL2\PCH.CPP /b MSBuildConsole_CancelEvent806a58ad24214fb9a0f508edf8dd6bea /c "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\CL.exe" /c /ZI /JMC /nologo /W3 /WX- /diagnostics:column /sdl /Od /D _DEBUG /D DLL2_EXPORTS /D _WINDOWS /D _USRDLL /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Zc:inline /Yc"pch.h" /Fp"x64\Debug\Dll2.pch" /Fo"x64\Debug\\" /Fd"x64\Debug\vc142.pdb" /external:W3 /Gd /TP /FC /errorReport:prompt pch.cpp
...
1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /ERRORREPORT:PROMPT /OUT:"...\Dll2\x64\Debug\Dll2.dll" /INCREMENTAL /ILK:"x64\Debug\Dll2.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:NO /manifest:embed /DEBUG /PDB:"...\Dll2\x64\Debug\Dll2.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"...\Dll2\x64\Debug\Dll2.lib" /MACHINE:X64 /DLL x64\Debug\dllmain.obj
Many thanks in advance for any tips!

CMake error to build the project with Cyrillic letters

I have error with build my project.
I use last CMake version.
And CryEngine.
"C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.3\Tools\CryVersionSelector\cryrun.exe" "build" "C:\Users\HP\Documents\CRYENGINE Projects\My Project\Game.cryproject"
Traceback (most recent call last):
File "cryselect.py", line 595, in <module>
File "cryselect.py", line 510, in cmd_run
File "C:\Python34\lib\encodings\cp866.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\u0490' in position 28: character maps to <undefined>
Failed to execute script cryselect
Problem with endcoding:
Сборка начата 03.07.2017 11:48:53.
Проект "C:\Users\HP\Documents\CRYENGINE Projects\My
Project\Solutions\Game.win_x64\CMakeFiles\CMakeTmp\cmTC_ba43f.vcxproj"
в узле 1 (целевые объекты по умолчанию).
PrepareForBuild:
Создание каталога "cmTC_ba43f.dir\Debug\".
Создание каталога "C:\Users\HP\Documents\CRYENGINE
Projects\My
Project\Solutions\Game.win_x64\CMakeFiles\CMakeTmp\Debug\".
Создание каталога
"cmTC_ba43f.dir\Debug\cmTC_ba43f.tlog\".
InitializeBuildStatus:
Создание
"cmTC_ba43f.dir\Debug\cmTC_ba43f.tlog\unsuccessfulbuild", так
как было задано "AlwaysCreate".
ClCompile:
C:\Program Files (x86)\Microsoft Visual
Studio\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64\CL.exe /c
/Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D
"CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS
/fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR
/Fo"cmTC_ba43f.dir\Debug\" /Fd"cmTC_ba43f.dir\Debug\vc141.pdb" /Gd
/TP /errorReport:queue "C:\Users\HP\Documents\CRYENGINE Projects\My
Project\Solutions\Game.win_x64\CMakeFiles\feature_tests.cxx"
Оптимизирующий компилятор Microsoft (R)
C/C++ версии 19.10.25019 для x64
(C) Корпорация Майкрософт (Microsoft
Corporation). Все права защищены.
cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D
_WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR
/Fo"cmTC_ba43f.dir\Debug\" /Fd"cmTC_ba43f.dir\Debug\vc141.pdb" /Gd
/TP /errorReport:queue "C:\Users\HP\Documents\CRYENGINE Projects\My
Project\Solutions\Game.win_x64\CMakeFiles\feature_tests.cxx"
feature_tests.cxx
Link:
C:\Program Files (x86)\Microsoft Visual
Studio\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64\link.exe
/ERRORREPORT:QUEUE /OUT:"C:\Users\HP\Documents\CRYENGINE Projects\My
Project\Solutions\Game.win_x64\CMakeFiles\CMakeTmp\Debug\cmTC_ba43f.exe"
/INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
/MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/manifest:embed /DEBUG /PDB:"C:/Users/HP/Documents/CRYENGINE
Projects/My
Project/Solutions/Game.win_x64/CMakeFiles/CMakeTmp/Debug/cmTC_ba43f.pdb"
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:/Users/HP/Documents/CRYENGINE Projects/My
Project/Solutions/Game.win_x64/CMakeFiles/CMakeTmp/Debug/cmTC_ba43f.lib"
/MACHINE:X64 /machine:x64 cmTC_ba43f.dir\Debug\feature_tests.obj
cmTC_ba43f.vcxproj -> C:\Users\HP\Documents\CRYENGINE Projects\My
Project\Solutions\Game.win_x64\CMakeFiles\CMakeTmp\Debug\cmTC_ba43f.exe
FinalizeBuildStatus:
Файл "cmTC_ba43f.dir\Debug\cmTC_ba43f.tlog\unsuccessfulbuild"
удаляется.
Обращение к
"cmTC_ba43f.dir\Debug\cmTC_ba43f.tlog\cmTC_ba43f.lastbuildstate".
Сборка проекта "C:\Users\HP\Documents\CRYENGINE
Projects\My
Project\Solutions\Game.win_x64\CMakeFiles\CMakeTmp\cmTC_ba43f.vcxproj"
завершена (целевые объекты по
умолчанию).
Сборка успешно завершена.
Предупреждений: 0
Ошибок: 0
Прошло времени 00:00:00.97
I have Russian language in Windows
Visual Studio 2017 English version

cmake OpenGL build error: LINK : fatal error LNK1123: failure during conversion to COFF

I've done everything step by step in the OpenGL tutorial here, but I keep getting this error when trying to build the tutorial with CMAKE.
Determining if the C compiler works failed with the following output:
Change Dir: C:/Programming/C++/OpenGL/OpenGL-tutorial_v0014_33/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe cmTryCompileExec1900997581.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=10.0
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.17929]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/19/2014 12:59:05 AM.
Project "C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTryCompileExec1900997581.dir\Debug\".
Creating directory "C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec1900997581.dir\Debug\\" /Fd"cmTryCompileExec1900997581.dir\Debug\vc100.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec1900997581.dir\Debug\\" /Fd"cmTryCompileExec1900997581.dir\Debug\vc100.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c
testCCompiler.c
ManifestResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581.exe.embed.manifest.res" cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581_manifest.rc
Link:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec1900997581.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:/Programming/C++/OpenGL/OpenGL-tutorial_v0014_33/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1900997581.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Programming/C++/OpenGL/OpenGL-tutorial_v0014_33/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1900997581.lib" /MACHINE:X86 cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581.exe.embed.manifest.res
cmTryCompileExec1900997581.dir\Debug\testCCompiler.obj /machine:X86 /debug
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj]
Done Building Project "C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.71

cmake project file not valid

I am building glm for vs 2012 but I get these errors with cmake
when I run vs2012 and compile a normal console application I also get error telling:
error C1069: cannot read compiler command line
And with cmake I get these errors, and I think the above error is related to it.
Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/Amar Thapa/Desktop/glm bin/CMakeFiles/CMakeTmp
Run Build Command:C:\Program Files\MSBuild\12.0\Bin\MSBuild.exe cmTryCompileExec2330384412.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=12.0
Microsoft (R) Build Engine version 12.0.21005.1
[Microsoft .NET Framework, version 4.0.30319.18408]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 12/23/2013 12:50:51 AM.
Project "C:\Users\Amar Thapa\Desktop\glm bin\CMakeFiles\CMakeTmp\cmTryCompileExec2330384412.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTryCompileExec2330384412.dir\Debug\".
Creating directory "C:\Users\Amar Thapa\Desktop\glm bin\CMakeFiles\CMakeTmp\Debug\".
Creating directory "cmTryCompileExec2330384412.dir\Debug\cmTryCom.89557F4B.tlog\".
InitializeBuildStatus:
Creating "cmTryCompileExec2330384412.dir\Debug\cmTryCom.89557F4B.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec2330384412.dir\Debug\\" /Fd"cmTryCompileExec2330384412.dir\Debug\vc120.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec2330384412.dir\Debug\\" /Fd"cmTryCompileExec2330384412.dir\Debug\vc120.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c
testCCompiler.c
testCCompiler.c(12): fatal error C1069: cannot read compiler command line [C:\Users\Amar Thapa\Desktop\glm bin\CMakeFiles\CMakeTmp\cmTryCompileExec2330384412.vcxproj]
Done Building Project "C:\Users\Amar Thapa\Desktop\glm bin\CMakeFiles\CMakeTmp\cmTryCompileExec2330384412.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Amar Thapa\Desktop\glm bin\CMakeFiles\CMakeTmp\cmTryCompileExec2330384412.vcxproj" (default target) (1) ->
(ClCompile target) ->
testCCompiler.c(12): fatal error C1069: cannot read compiler command line [C:\Users\Amar Thapa\Desktop\glm bin\CMakeFiles\CMakeTmp\cmTryCompileExec2330384412.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.34

CMake 2.8.12 with VS2010 compiler has error when building the CGAL-4.3

I am a fresh on CGAL, I met a problem, my CMake2.8.12 (VS2010 c++ express version) seems can not work for the CGAL 4.3. I put the Error.log here
Determining if the CXX compiler works failed with the following output:
Change Dir: D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe cmTryCompileExec3635631916.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=10.0
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18052]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/18/2013 9:30:40 AM.
Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTryCompileExec3635631916.dir\Debug\".
Creating directory "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec3635631916.dir\Debug\\" /Fd"cmTryCompileExec3635631916.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec3635631916.dir\Debug\\" /Fd"cmTryCompileExec3635631916.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
testCXXCompiler.cxx
ManifestResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916.exe.embed.manifest.res" cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916_manifest.rc
Link:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec3635631916.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3635631916.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3635631916.lib" /MACHINE:X86 cmTryCompileExec3635631916.dir\Debug\cmTryCompileExec3635631916.exe.embed.manifest.res
cmTryCompileExec3635631916.dir\Debug\testCXXCompiler.obj /machine:X86 /debug
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj]
Done Building Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj" (default targets) -- FAILED.
Build FAILED.
"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3635631916.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.20
Determining if the CXX compiler works failed with the following output:
Change Dir: D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe cmTryCompileExec3236418378.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=10.0
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18052]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/18/2013 9:32:41 AM.
Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTryCompileExec3236418378.dir\Debug\".
Creating directory "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec3236418378.dir\Debug\\" /Fd"cmTryCompileExec3236418378.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec3236418378.dir\Debug\\" /Fd"cmTryCompileExec3236418378.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
testCXXCompiler.cxx
ManifestResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378.exe.embed.manifest.res" cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378_manifest.rc
Link:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec3236418378.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3236418378.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3236418378.lib" /MACHINE:X86 cmTryCompileExec3236418378.dir\Debug\cmTryCompileExec3236418378.exe.embed.manifest.res
cmTryCompileExec3236418378.dir\Debug\testCXXCompiler.obj /machine:X86 /debug
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj]
Done Building Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj" (default targets) -- FAILED.
Build FAILED.
"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec3236418378.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.20
Determining if the CXX compiler works failed with the following output:
Change Dir: D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe cmTryCompileExec787580669.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=10.0
Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.18052]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/18/2013 9:35:54 AM.
Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTryCompileExec787580669.dir\Debug\".
Creating directory "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669.unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec787580669.dir\Debug\\" /Fd"cmTryCompileExec787580669.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec787580669.dir\Debug\\" /Fd"cmTryCompileExec787580669.dir\Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:queue testCXXCompiler.cxx
testCXXCompiler.cxx
ManifestResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669.exe.embed.manifest.res" cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669_manifest.rc
Link:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec787580669.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec787580669.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Program Files (x86)/CGAL-4.3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec787580669.lib" /MACHINE:X86 cmTryCompileExec787580669.dir\Debug\cmTryCompileExec787580669.exe.embed.manifest.res
cmTryCompileExec787580669.dir\Debug\testCXXCompiler.obj /machine:X86 /debug
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj]
Done Building Project "D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj" (default targets) -- FAILED.
Build FAILED.
"D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:\Program Files (x86)\CGAL-4.3\CMakeFiles\CMakeTmp\cmTryCompileExec787580669.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.20
I dont know what to do, please help me. Thank you very much!!!
Your version number indicates you're not running SP1. Update Visual Studio 2010, then the problem should be solved, as it was for me.