Curl static compilation problem (X509_NAME) on Windows with BoringSSL 1.1.0 - libcurl

I have a recent problem when I try to compile Curl static lib on windows with BoringSSL. The above commands where working fine 6 months ago, but with latest versions of Curl and BoringSSL I came into an issue in the nmake command.
What I'm doing:
call buildconf.bat
cd "winbuild"
set RTLIBCFG=static
set _CL_=-MTd -Ob0 -Od -Zi -FS
call nmake /NOLOGO /X - /F MakeFile.vc VC=16 mode=static MACHINE=x64 DEBUG=yes WITH_PREFIX="C:/cpplibs/Curl" WITH_SSL=static SSL_PATH="C:/cpplibs/BoringSSL" ENABLE_SSPI=yes ENABLE_IPV6=yes ENABLE_IDN=yes ENABLE_WINSSL=no
What I face with in console output:
Generating prerequisite files
* C:\cpplibs\Sources\Curl\latest\Makefile
* C:\cpplibs\Sources\Curl\latest\src\tool_hugehelp.c
configuration name: libcurl-vc16-x64-release-static-ssl-static-ipv6-sspi
cl /O2 /DNDEBUG /MT /DCURL_STATICLIB /I. /I ../lib /I../include /nologo /W4 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /DUSE_OPENSSL /I"C:/cpplibs/BoringSSL" /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES /DUSE_IPV6 /DUSE_WINDOWS_SSPI /Fo"..\builds\libcurl-vc16-x64-release-static-ssl-static-ipv6-sspi-obj-lib/altsvc.obj" ..\lib\altsvc.c
altsvc.c
... 100+ successfull calls
cl /O2 /DNDEBUG /MT /DCURL_STATICLIB /I. /I ../lib /I../include /nologo /W4 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /DUSE_OPENSSL /I"C:/cpplibs/BoringSSL" /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES /DUSE_IPV6 /DUSE_WINDOWS_SSPI /Fo"..\builds\libcurl-vc16-x64-release-static-ssl-static-ipv6-sspi-obj-lib/vtls/openssl.obj" ..\lib\vtls\openssl.c
openssl.c
C:/cpplibs/BoringSSL/openssl/base.h(362): error C2059: syntax error: '<parameter-list>'
C:/cpplibs/BoringSSL/openssl/x509.h(154): error C2059: syntax error: '<parameter-list>'
C:/cpplibs/BoringSSL/openssl/x509.h(154): error C2143: syntax error: missing ')' before '('
C:/cpplibs/BoringSSL/openssl/x509.h(154): error C2059: syntax error: ')'
C:/cpplibs/BoringSSL/openssl/x509.h(154): error C2143: syntax error: missing ')' before 'constant'
C:/cpplibs/BoringSSL/openssl/x509.h(154): error C2091: function returns function
...
C:/cpplibs/BoringSSL/openssl/x509_vfy.h(508): error C2061: syntax error: identifier 'X509_STORE_get_lookup_crls'
C:/cpplibs/BoringSSL/openssl/x509_vfy.h(508): error C2059: syntax error: ';'
C:/cpplibs/BoringSSL/openssl/x509_vfy.h(508): error C2059: syntax error: '<parameter-list>'
C:/cpplibs/BoringSSL/openssl/x509_vfy.h(508): fatal error C1003: error count exceeds 100; stopping compilation
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
So I've investigated, and all the errors at the indicated lines seems to have in common the X509_NAME typedef usage, but the definition is correct in openssl/base.h:
typedef struct X509_name_st X509_NAME;
And in openssl/x509.h:
struct X509_name_st {
STACK_OF(X509_NAME_ENTRY) * entries;
int modified; // true if 'bytes' needs to be built
BUF_MEM *bytes;
// unsigned long hash; Keep the hash around for lookups
unsigned char *canon_enc;
int canon_enclen;
} /* X509_NAME */;
Furthermore the file ..\lib\vtls\openssl.c in Curl lib includes <openssl/x509v3.h> that includes <openssl/x509.h> that includes <openssl/base.h> ... So everything should be OK, but it's not.
Is there something missing in my commands ?

Related

ProtocolBuffer C++ Visual Studio 2019

I am trying to build Protocolbuffer for Visual Studio 2019 x86,
I followed the steps in this page
https://github.com/protocolbuffers/protobuf/blob/main/cmake/README.md
for release I tried:
cmake -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_GENERATOR_PLATFORM=Win32 ^
-DCMAKE_INSTALL_PREFIX=C:\protocolbuffers\install ^
C:\protocolbuffers\protobuf
I have the error
CMake Error at CMakeLists.txt:24 (project): Generator
NMake Makefiles
does not support platform specification, but platform
Win32
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake
Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
if I removed the -DCMAKE_GENERATOR_PLATFORM=Win32 ^ I can create the correct files but when I compile the error is
protocolbuffers\protobuf\src\google\protobuf\extension_set_unittest.cc(871):
note: see reference to function template instantiation 'int
google::protobuf::internal::RepeatedFieldLowerClampLimit<int64_t,4>(void)'
being compiled NMAKE : fatal error U1077: '"C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe"'
: return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\nmake.exe"'
: return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\nmake.exe"'
: return code '0x2' Stop.
I need to create the lib files for:
libprotobuf.lib, libprotobuf-lite.lib, libprotoc.lib
and
protoc.exe

Fail building CGAL with cmake on windows

the error code:
C:\dev\CGAL-4.8.1\build>cmake ..
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
CMake Deprecation Warning at CMakeLists.txt:9 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at CMakeLists.txt:12 (cmake_policy):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at CMakeLists.txt:20 (cmake_policy):
The OLD behavior for policy CMP0042 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
== Setting paths ==
-- Build CGAL from release in directory CGAL-4.8.1
-- Packagenames: CGAL-4.8.1
== Setting paths (DONE) ==
== Generate version files ==
-- CGAL_MAJOR_VERSION=4
-- CGAL_MINOR_VERSION=8
-- CGAL_BUGFIX_VERSION=1
-- CGAL_SONAME_VERSION=11
-- CGAL_SOVERSION =11.0.2
-- CGAL_REFERENCE_CACHE_DIR=
-- Building shared libraries
-- Visual Leak Detector (VLD) is not found.
-- Targetting Visual Studio 16 2019
-- Target build enviroment supports auto-linking
-- Using VC14 compiler.
-- Generator uses intermediate configuration directory: $(Configuration)
-- USING CMake version: 3.24.0
-- System: Windows
== Generate version files (DONE) ==
== Set up flags ==
-- Build type: Release
-- USING CXXFLAGS = '/DWIN32 /D_WINDOWS /W3 /GR /EHsc -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS /fp:strict /fp:except- /wd4503 /bigobj /MD /O2 /Ob2 /DNDEBUG'
-- USING LDFLAGS = '/machine:x64 /INCREMENTAL:NO'
== Set up flags (DONE) ==
== Detect external libraries ==
-- External libraries supported: GMP;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
-- Preconfiguring library: GMP ...
-- GMP has been preconfigured:
-- UseGMP-file:
-- GMP include: C:/dev/CGAL-4.8.1/auxiliary/gmp/include
-- GMP libraries: C:/dev/CGAL-4.8.1/auxiliary/gmp/lib/libgmp-10.lib
-- GMP definitions:
-- USING GMP_VERSION = '5.0.1'
-- Preconfiguring library: MPFR ...
-- MPFR has been preconfigured:
-- UseMPFR-file:
-- MPFR include: C:/dev/CGAL-4.8.1/auxiliary/gmp/include
-- MPFR libraries: C:/dev/CGAL-4.8.1/auxiliary/gmp/lib/libmpfr-4.lib
-- MPFR definitions:
-- USING MPFR_VERSION = '3.0.0'
-- Boost include: D:/geometry_lib/boost_1_61_0
-- Boost libraries:
-- Boost definitions:
-- USING BOOST_VERSION = '1.61.0'
== Detect external libraries (DONE) ==
== Write compiler_config.h ==
-- Performing Test CGAL_CFG_BOOST_VARIANT_SWAP_BUG - Failed
-- Performing Test CGAL_CFG_DENORMALS_COMPILE_BUG - Success
-- Performing Test CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG - Failed
-- Performing Test CGAL_CFG_IEEE_754_BUG - Success
-- Performing Test CGAL_CFG_ISTREAM_INT_BUG - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_5 - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_6 - Failed
-- Performing Test CGAL_CFG_MATCHING_BUG_7 - Success
-- Performing Test CGAL_CFG_MATCHING_BUG_8 - Success
-- Performing Test CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG - Success
-- Performing Test CGAL_CFG_NO_LIMITS - Success
-- Performing Test CGAL_CFG_NO_NEXTAFTER - Success
-- Performing Test CGAL_CFG_NO_STL - Success
-- Performing Test CGAL_CFG_NUMERIC_LIMITS_BUG - Success
-- Performing Test CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG - Success
-- Performing Test CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG - Success
-- Performing Test CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG - Success
-- Performing Test CGAL_CFG_USING_BASE_MEMBER_BUG_2 - Success
== Write compiler_config.h (DONE) ==
== Generating build files ==
Configuring libCGAL
-- Requested component: MPFR
-- Requested component: GMP
libCGAL is configured
-- Sources for CGAL component library 'CGAL_Core' detected
Configuring libCGAL_Core
-- Requested component: MPFR
-- Requested component: GMP
libCGAL_Core is configured
-- Sources for CGAL component library 'CGAL_ImageIO' detected
Configuring libCGAL_ImageIO
-- OpenGL include:
-- OpenGL libraries: opengl32;glu32
-- WARNING: ZLIB found but could not compile print_ZLIB_version.cpp:
-- ZLIB_INCLUDE_DIR=C:/msys64/mingw64/include
-- ZLIB_LIBRARIES=C:/msys64/mingw64/lib/libz.dll.a
-- ZLIB_LIBRARIES_DIR=
-- Change Dir: C:/dev/CGAL-4.8.1/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/MSBuild/Current/Bin/MSBuild.exe cmTC_88d6d.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30145 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
print_ZLIB_version.cpp
cl /c /IC:\msys64\mingw64\include /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D _CRT_SECURE_NO_DEPRECATE /D
_SCL_SECURE_NO_DEPRECATE /D _CRT_SECURE_NO_WARNINGS /D _SCL_SECURE_NO_WARNINGS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:strict /fp:except- /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_88d6d.dir\Debug\\" /Fd"cmTC_88d6d.dir\Debug\vc142.pdb" /external:W3 /Gd /TP /wd4503 /errorReport:queue /bigobj "C:\dev\CGAL-4.8.1\config\support\print_ZLIB_version.cpp"
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(61,26): warning C4083: expected ')'; found identifier '_VCRUNTIME_DISABLED_WARNINGS' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(111,1): warning C4005: '_CRT_STRINGIZE': macro redefinition [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\_mingw.h(293): message : see previous definition of '_CRT_STRINGIZE' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(114,1): warning C4005: '_CRT_WIDE': macro redefinition [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\_mingw.h(298): message : see previous definition of '_CRT_WIDE' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(155,1): warning C4005: '__CRTDECL': macro redefinition [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\_mingw.h(405): message : see previous definition of '__CRTDECL' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(310,1): warning C4005: '_CRT_DEPRECATE_TEXT': macro redefinition [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\_mingw.h(356): message : see previous definition of '_CRT_DEPRECATE_TEXT' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(351,51): error C2065: 'uintptr_t': undeclared identifier [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(351,61): error C2146: syntax error: missing ')' before identifier '_StackCookie' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(352,67): error C2065: 'uintptr_t': undeclared identifier [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(352,77): error C2146: syntax error: missing ')' before identifier '_StackCookie' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(356,35): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(356,18): error C2146: syntax error: missing ';' before identifier '__security_cookie' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\corecrt.h(75,53): error C2378: 'uintptr_t': redefinition; symbol cannot be overloaded with a typedef [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\vcruntime.h(356): message : see declaration of 'uintptr_t' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\yvals.h(13,1): warning C4005: '_CPPLIB_VER': macro redefinition [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\yvals_core.h(556): message : see previous definition of '_CPPLIB_VER' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(209,5): error C2065: '__asm__': undeclared identifier [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(209,13): error C2146: syntax error: missing ';' before identifier '__volatile__' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(209,35): error C2143: syntax error: missing ')' before ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(209,13): error C3861: '__volatile__': identifier not found [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(209,35): error C2143: syntax error: missing ';' before ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(209,35): error C2059: syntax error: ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(209,57): error C2059: syntax error: ')' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(220,5): error C2065: '__asm__': undeclared identifier [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(220,13): error C2146: syntax error: missing ';' before identifier '__volatile__' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(220,35): error C2143: syntax error: missing ')' before ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(220,13): error C3861: '__volatile__': identifier not found [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(220,35): error C2143: syntax error: missing ';' before ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(220,35): error C2059: syntax error: ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(220,57): error C2059: syntax error: ')' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(231,5): error C2065: '__asm__': undeclared identifier [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(231,13): error C2146: syntax error: missing ';' before identifier '__volatile__' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(231,35): error C2143: syntax error: missing ')' before ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(231,13): error C3861: '__volatile__': identifier not found [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(231,35): error C2143: syntax error: missing ';' before ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(231,35): error C2059: syntax error: ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(231,57): error C2059: syntax error: ')' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(1157,7): error C2065: '__asm__': undeclared identifier [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(1157,15): error C2146: syntax error: missing ';' before identifier '__volatile__' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(1158,11): error C2143: syntax error: missing ')' before ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(1157,15): error C3861: '__volatile__': identifier not found [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(1158,11): error C2143: syntax error: missing ';' before ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(1158,11): error C2059: syntax error: ':' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\math.h(1158,45): error C2059: syntax error: ')' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(148,115): error C2061: syntax error: identifier 'uintptr_t' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(388,16): error C2059: syntax error: '__declspec(nothrow)' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(389,16): error C2059: syntax error: '__declspec(nothrow)' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(391,16): error C2059: syntax error: '__declspec(nothrow)' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(396,27): error C2144: syntax error: 'int' should be preceded by ';' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(396,50): warning C4091: '__declspec(noreturn)': ignored on left of 'int' when no variable is declared [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(398,54): error C2381: '_Exit': redefinition; 'noreturn' differs [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(396): message : see declaration of '_Exit' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(399,6): error C3861: '_exit': identifier not found [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(405,16): error C2059: syntax error: '__declspec(noreturn)' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(499,18): error C2059: syntax error: '__declspec(nothrow)' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(500,17): error C2059: syntax error: '__declspec(nothrow)' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(502,23): error C2059: syntax error: '__declspec(nothrow)' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(505,25): error C2059: syntax error: '__declspec(nothrow)' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(683,70): error C2144: syntax error: 'int' should be preceded by ';' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(683,95): warning C4091: '': ignored on left of 'int' when no variable is declared [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(685,49): error C2144: syntax error: 'int' should be preceded by ';' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(685,74): warning C4091: '': ignored on left of 'int' when no variable is declared [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(686,56): error C2144: syntax error: 'int' should be preceded by ';' [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\stdlib.h(686,81): warning C4091: '': ignored on left of 'int' when no variable is declared [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
C:\msys64\mingw64\include\malloc.h(82,10): fatal error C1083: Cannot open include file: 'mm_malloc.h': No such file or directory [C:\dev\CGAL-4.8.1\CMakeFiles\CMakeTmp\cmTC_88d6d.vcxproj]
-- USING ZLIB_VERSION = 'unknown'
-- Requested component: MPFR
-- Requested component: GMP
libCGAL_ImageIO is configured
-- Sources for CGAL component library 'CGAL_Qt5' detected
Configuring libCGAL_Qt5
CMake Deprecation Warning at src/CGAL_Qt5/CMakeLists.txt:4 (cmake_policy):
The OLD behavior for policy CMP0043 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- libCGAL_Qt5 is missing the dependencies: Qt5OpenGL Qt5Svg Qt5 cannot be configured.
-- Sources for CGAL component libraries 'CGAL_Core;CGAL_ImageIO;CGAL_Qt5' detected
== Generating build files (DONE) ==
-- Configuring done
-- Generating done
-- Build files have been written to: C:/dev/CGAL-4.8.1
First, please forgive my poor English, thx guys.
I install the CGAL lib through using the CGAL-4.8.1-Setup.exe got from github and following the step on the CGAM manual
I want to install the lib and get the dynamic lib with suffix .dll, but something gets wrong when I use cmake .., and it seems like I could not solve them by myself.
I already install gmp and mpfr and boost, and also add their directory into PATH, or as system variable, so I don't know what wrong with it.I can't get a makefile through using cmake .. in the dir build.
My aim is to get the dynamic lib CGAL-vc140-mt-gd-4.8.1.dll

Getting an error building static libcurl VS2019

First I make nmake work:
set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.28.29812\bin\Hostx64\x86
then I git clone https://github.com/curl/curl.git --depth=1
Then I run buildconf.bat all seems fine.
then I go to winbuild and run nmake /f Makefile.vc mode=static and the build fails with the following error:
configuration name: libcurl-vc-x64-release-static-ipv6-sspi-schannel
cl /O2 /DNDEBUG /MD /DCURL_STATICLIB /I. /I ../lib /I../include /nologo /W4 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES /DUSE_IPV6 /DUSE_WINDOWS_SSPI /DUSE_SCHANNEL /Fo"..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-lib/altsvc.obj" ..\lib\altsvc.c
altsvc.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\windows.h(167): fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.28.29812\bin\Hostx64\x86\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.28.29812\bin\Hostx64\x86\nmake.exe"' : return code '0x2'
Stop.
Is my nmake installed wrong?
If your ultimate goal is to "Get a static library compiled with a local cl compiler", I suggest you try the "vcpkg".
All you have to do is "vcpkg install curl". It will download the source code and compiled locally. :)

Visual Studio 15 migrate from X86 to X64 Error in Resource compile

When I want do Compile my Resources have the following error
error C2039: 'SetDefaultDllDirectories': is not a member of '`global namespace''
Writing STRING:2788, lang:0x410, size 34
cl /nologo /W4 /GR /EHsc /GF /Gy /DWINVER=0x0501 /D"_MBCS" /D"_AFXDLL" /U"_UNICODE" /Fo"Debug/" /Fd"Debug/" /FD /MDd /Od /D"WIN32" /I"D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\NmsBuild\Include" /I"D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Ms\Include" /I"D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Mf\Include" /I"D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\PlatformSDK\Include" /D"_DEBUG" "Debug\NmsLib_LANG.cpp" /link /NOLOGO /SUBSYSTEM:WINDOWS /MACHINE:I386 /base:0x13600000 /version:1.1 /incremental:no /map:"Debug\NmsLib_LANG.map" /dll /out:"D:\Home\Atiras\V77Ma_64Bit_Branch001\Bin\Debug\.\NmsLib_LANG.dll" /libpath:"D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Mf\Lib" /libpath:"D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Ms\Lib" /libpath:"D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\PlatformSDK\Lib" "Debug\NmsLib_LANG.res"
NmsLib_LANG.cpp
D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Mf\Include\afx.h(38): warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be removed in a future version of MFC.
D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Mf\Include\afx.h(33): note: see declaration of 'MBCS_Support_Deprecated_In_MFC'
d:\home\atiras\v77ma_64bit_branch001\bindll\ms\include\sal_supp.h(57): warning C4005: '__useHeader': macro redefinition
D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Ms\Include\sal.h(2866): note: see previous definition of '__useHeader'
d:\home\atiras\v77ma_64bit_branch001\bindll\ms\include\specstrings_supp.h(77): warning C4005: '__on_failure': macro redefinition
D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Ms\Include\sal.h(2876): note: see previous definition of '__on_failure'
D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Mf\Include\atlcore.h(644): error C2039: 'SetDefaultDllDirectories': is not a member of '`global namespace''
D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Mf\Include\atlcore.h(644): error C2065: 'SetDefaultDllDirectories': undeclared identifier
D:\Home\Atiras\V77Ma_64Bit_Branch001\BinDll\Mf\Include\atlcore.h(646): error C2065: 'LOAD_LIBRARY_SEARCH_SYSTEM32': undeclared identifier
I have defined _USING_V110_SDK71_ but that does not seams to work on Resource Compiling

NMAKE : fatal error U1077: return code '0x2'

I am trying to build libsvm binary for Windows. But nmake returns an error code.
C:\Users\user\Desktop\libsvm-3.23>nmake -f Makefile.win clean all
Microsoft (R) Program Maintenance Utility Version 14.14.26433.0
Copyright (C) Microsoft Corporation. All rights reserved.
erase /Q *.obj windows\*.exe windows\*.dll windows\*.exp windows\*.lib
Could Not Find C:\Users\user\Desktop\libsvm-3.23\*.obj
Could Not Find C:\Users\user\Desktop\libsvm-3.23\windows\*.exe
cl.exe /nologo /O2 /EHsc /I. /D _WIN64 /D _CRT_SECURE_NO_DEPRECATE -c sv
m.cpp
svm.cpp
C:\Program Files (x86)\Microsoft VisualStudio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include\vcruntime.h(180): error C2371: 'size_t': redefinition;different basic types
predefined C++ types (compiler internal)(16): note: see declaration of 'size_t'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.exe"' : return code '0x2'
Stop.
C:\Users\user\Desktop\libsvm-3.23>
What is the wrong with this?