Specify include directories for resources in command line - windows

I am trying to build cURL on Windows using the following line:
nmake vc-x64 mode=dll VC=10 MACHINE=x64
Now I have done this setup before building:
set PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64;%PATH%
set INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include";"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"
set LIB="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\amd64";"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64"
set LIBPATH="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\amd64"
set PATH="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\x64";%PATH%)
set INCLUDE="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include";%INCLUDE%
set LIB="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64";%LIB%
I get the following error:
rc /dDEBUGBUILD=0 /Fo ..\builds\libcurl-vc10-x64-release-dll-ipv6-sspi-w
inssl-obj-lib\libcurl.res ..\lib\libcurl.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation. All rights reserved.
..\lib\libcurl.rc(22) : fatal error RC1015: cannot open include file 'winver.h'.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A
\Bin\x64\rc.EXE"' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\bin\amd64\nmake.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\bin\amd64\nmake.EXE"' : return code '0x2'
Stop.
It does not seem to find the file "winver.h" despite the fact that this file is in the directory "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include", and that this directory is in my INCLUDE variable.
It looks like rc does not take in account the variable INCLUDE to find the include paths. Is there a way to add an include path for the rc command? Unless this is something completely different of course.

Related

Missing mspdbcore.dll when compiling arm or arm64 programs with cl.exe from VS 2017

My attempts to compile the simplest of C program to ARM, directly with cl.exe on a Win10 x86-64 environment always results in the following error:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\arm\cl.exe" /c 1.c
1.c
c1: fatal error C1356: unable to find mspdbcore.dll
Note that everything works fine if I target x86 code: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.exe" /c 1.c
I can compile and link this program just fine if doing it from within VS. Am I missing something on the PATH? It also seems that I only have two versions of mspdbcore.dll, one in Hostx64/x64 and another one in Hostx86/x86; nothing in the arm/arm64 equivalent folders.
File: 1.c:
int main(void) {
return 0;
}
Okay, it turned out the problem was connected to missing or incorrect environment variables after all...
I set up custom overrides for PATH, INCLUDE, LIB, and LIBPATH matching the values provided by the "VC++ Directories" options of a sample ARM VS project, and things are now compiling smoothly.
Edit #1: Settings I used, for VS2017: (They can be found in the "VC++ Directories" options widget I mentioned above)
set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\arm;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\tools;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ide;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\atlmfc\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\lib\ARM;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\atlmfc\lib\ARM;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\VS\lib\ARM;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\arm;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\arm;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\arm;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Lib\um\arm
set LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\atlmfc\lib\ARM;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\lib\ARM;C:\Program Files (x86)\Windows Kits\10\References
Some VS directories have mspdbcore.dll, and some don't. Declaring the path in LIBPATH doesn't fix it.
For example, .\bin\Hostx64\x64\ and .\bin\Hostx86\x86\ have mspdbcore.dll, but .\bin\Hostx64\x86\ does not, so if you want to run the 32-bit compiler on a 64-bit system, use .\bin\Hostx86\x86\cl.exe, not .\bin\Hostx64\x86\cl.exe.

How do I avoid the "unresolved external symbol _mainCRTStartup" error when using the MSVC toolchain (ex: CL.EXE) from within an MSYS environment?

How do I avoid the unresolved external symbol _mainCRTStartup error when using the MSVC toolchain (ex: CL.EXE) from within an MSYS environment?
Details:
I started a "VS2013 x64 Native Tools Command Prompt" and the launched C:\msys64\msys2.exe from there.
In my MSYS session I get results like this:
user#host MSYS /c/libpostal/libpostal
$ "/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64/vcvars64.bat"
user#host MSYS /c/libpostal/libpostal
$ cl "-nologo" "conftest.c" "-link" "-SUBSYSTEM:CONSOLE"
conftest.c
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
conftest.exe : fatal error LNK1120: 1 unresolved externals
user#host MSYS /c/libpostal/libpostal
$ cat conftest.c
/* confdefs.h */
#define PACKAGE_NAME "libpostal"
#define PACKAGE_TARNAME "libpostal"
#define PACKAGE_VERSION "1.0.0"
#define PACKAGE_STRING "libpostal 1.0.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "libpostal"
#define VERSION "1.0.0"
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
user#host MSYS /c/libpostal/libpostal
$ echo $PATH
/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
If I try to put the same "cl" command into the "VS2013 x64 Native Tools Command Prompt", I get the expected result instead:
C:\libpostal\libpostal>cl "-nologo" "conftest.c" "-link" "-SUBSYSTEM:CONSOLE"
conftest.c
C:\libpostal\libpostal>cl "/nologo" "conftest.c" "/link" "/SUBSYSTEM:CONSOLE"
conftest.c
C:\libpostal\libpostal>conftest.exe
C:\libpostal\libpostal>echo %PATH%
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\MSBuild\12.0\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\MSBuild\12.0\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\WindowsKits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\;C:\Program Files\Microsoft Dynamics AX\60\BusinessConnector\Bin\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files(x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Git\cmd;C:\D\dmd2\windows\bin;C:\msys64;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\bin;C:\msys64\opt\bin
This happened while I was trying to use cccl to build a posix project (libpostal) using the MSVC toolchain so I can link it with other MSVC code. As such, any answers involving Visual Studio GUI will probably not be very helpful: I need to figure out how to make it work from within the MSYS2/MSYS64 environment.
In the MSYS example I intentionally moved /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin to the beginning of my $PATH to avoid selecting the wrong executables. I originally received the same results (exact same error message) when it was at the end of the $PATH instead.
After checking everything in agonizing detail, I found the problem:
When C:\msys64\msys2.exe is executed from the "VS2013 x64 Native Tools Command Prompt", the $PATH variable will end up containing /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin, but that is the wrong directory for 64-bit work. Instead the path should contain /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64. Once I did that substitution, cl.exe worked fine.
Running vcvars64.bat from within the MSYS environment will not fix the $PATH. The above substitution has to be done manually or from a custom startup script like ~/.bashrc.

LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'

I am trying to download a channels package for making a chatbot by using google tensorflow. But, I am getting the following error:
3.5\twisted\words\im
copying src\twisted\words\xish\xpathparser.g -> build\lib.win-amd64-3.5\twis
ted\words\xish
running build_ext
building 'twisted.test.raiser' extension
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
creating build\temp.win-amd64-3.5\Release\src
creating build\temp.win-amd64-3.5\Release\src\twisted
creating build\temp.win-amd64-3.5\Release\src\twisted\test
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 -Ic:\python\python35\include -Ic:\python\pyt
hon35\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"
-IC:\Python\Python35\include "-IC:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\bin" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt
" "-IC:\Program Files (x86)\Windows Kits\8.1\Include\shared" "-IC:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\lib\amd64" "-IC:\Program Files (x86)\Micr
osoft Visual Studio 14.0\VC\lib\arm" "-IC:\Program Files (x86)\Microsoft Visual
Studio 14.0\VC\lib\store" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\bin\amd64_x86" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
\amd64_arm" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_ar
m" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64" "-IC:\Pr
ogram Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" "-IC:\Program F
iles (x86)\Microsoft Visual Studio 14.0\VC\lib\store\amd64" "-IC:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\lib\store\arm" "-IC:\Program Files (x86)\M
icrosoft Visual Studio 14.0\VC\lib" -IC:\Python\Python35\Lib "-IC:\Program Files
(x86)\Microsoft Visual Studio\Installer\resources\app\lib" /Tcsrc/twisted/test/
raiser.c /Fobuild\temp.win-amd64-3.5\Release\src/twisted/test/raiser.obj
cl : Command line warning D9024 : unrecognized source file type 'C:\Program'
, object file assumed
cl : Command line warning D9027 : source file 'C:\Program' ignored
cl : Command line warning D9024 : unrecognized source file type 'Files', obj
ect file assumed
cl : Command line warning D9027 : source file 'Files' ignored
cl : Command line warning D9024 : unrecognized source file type '(x86)\Micro
soft', object file assumed
cl : Command line warning D9027 : source file '(x86)\Microsoft' ignored
cl : Command line warning D9024 : unrecognized source file type 'Visual', ob
ject file assumed
cl : Command line warning D9027 : source file 'Visual' ignored
cl : Command line warning D9024 : unrecognized source file type 'Studio', ob
ject file assumed
cl : Command line warning D9027 : source file 'Studio' ignored
cl : Command line warning D9024 : unrecognized source file type '14.0\VC\bin
\amd64_arm;', object file assumed
cl : Command line warning D9027 : source file '14.0\VC\bin\amd64_arm;' ignor
ed
raiser.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe /nologo
/INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\pyth
on\python35\libs /LIBPATH:c:\python\python35\PCbuild\amd64 /EXPORT:PyInit_raiser
build\temp.win-amd64-3.5\Release\src/twisted/test/raiser.obj /OUT:build\lib.win
-amd64-3.5\twisted\test\raiser.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3
.5\Release\src/twisted/test\raiser.cp35-win_amd64.lib
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\b
in\\link.exe' failed with exit status 1104
----------------------------------------
Command "c:\python\python35\python.exe -u -c "import setuptools, tokenize;__file
__='C:\\Users\\krati\\AppData\\Local\\Temp\\pip-build-nzxnni5z\\twisted\\setup.p
y';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\kr
ati\AppData\Local\Temp\pip-3y_pe9kx-record\install-record.txt --single-version-e
xternally-managed --compile" failed with error code 1 in C:\Users\krati\AppData\
Local\Temp\pip-build-nzxnni5z\twisted\
I am using python 3.5 on Windows 7 64 bit operating system, Visual Studio Community 2017 and Microsoft Visual Studio 14.0 .I have tried everything, link the paths to the environment variable and include variable but still this error exists.
Can someone please help in resolving that..thanks in advance

How to use clang with Visual Studio and stlib?

I have installed prebuilt llvm + clang for windows 3.6.2, and Visual Studio 2015. Now in VS 2015, you can create projects and set compiler to clang. It seems the installation of clang has registered the compilers to the settings. Everything else works fine, except I cannot use and standard libraries.
The compiler setting for clang is LLVM-vs2014 under properties->general->platform tools
For instance, when compiling this code
#include <iostream>
int main(int argc, char ** argv) {
return 0; }
if I delete the #include line, everything works fine.
any idea?
The output message from VS is:
1>------ Build started: Project: TT, Configuration: Debug Win32 ------
1>clang-cl.exe : warning : argument unused during compilation: '/ZI'
1>clang-cl.exe : warning : argument unused during compilation: '/Gm'
1>clang-cl.exe : warning : argument unused during compilation: '/GS'
1>clang-cl.exe : warning : argument unused during compilation: '/fp:precise'
1>clang-cl.exe : warning : argument unused during compilation: '/FdDebug\vc140.pdb'
1> In file included from main.cpp:1:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
1
> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:7:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath:656:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xtgmath.h:8:
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xtr1common(231,22): error : use of undeclared identifier 'char16_t'
1> struct _Is_integral<char16_t>
1> ^
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xtr1common(237,22): error : use of undeclared identifier 'char32_t'
1> struct _Is_integral<char32_t>
1> ^
1> In file included from main.cpp:1:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:8:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdexcept:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception:7:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\type_traits:6:
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(408,14): error : use of undeclared identifier 'char16_t'
1> struct hash<char16_t>
1> ^
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef(414,14): error : use of undeclared identifier 'char32_t'
1> struct hash<char32_t>
1> ^
1> In file included from main.cpp:1:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:8:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdexcept:7:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0:8:
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\limits(615,33): error : use of undeclared identifier 'char16_t'
1> template<> class numeric_limits<char16_t>
1> ^
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\limits(905,33): error : use of undeclared identifier 'char32_t'
1> template<> class numeric_limits<char32_t>
1> ^
1> In file included from main.cpp:1:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:8:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdexcept:7:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0:10:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xutility:8:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\utility:7:
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iosfwd(267,21): error : use of undeclared identifier 'char16_t'
1> struct char_traits<char16_t>
1> ^
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iosfwd(276,21): error : use of undeclared identifier 'char32_t'
1> struct char_traits<char32_t>
1> ^
1> In file included from main.cpp:1:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:8:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdexcept:7:
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring(2623,22): error : use of undeclared identifier 'char16_t'
1> typedef basic_string<char16_t, char_traits<char16_t>, allocator<char16_t> >
1> ^
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring(2623,53): error : expected unqualified-id
1> typedef basic_string<char16_t, char_traits<char16_t>, allocator<char16_t> >
1> ^
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring(2625,22): error : use of undeclared identifier 'char32_t'
1> typedef basic_string<char32_t, char_traits<char32_t>, allocator<char32_t> >
1> ^
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring(2625,53): error : expected unqualified-id
1> typedef basic_string<char32_t, char_traits<char32_t>, allocator<char32_t> >
1> ^
1> In file included from main.cpp:1:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale(1004,30): error : use of undeclared identifier 'char16_t'
1> class _CRTIMP2_PURE codecvt<char16_t, char, _Mbstatet>
1> ^
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale(1328,30): error : use of undeclared identifier 'char32_t'
1> class _CRTIMP2_PURE codecvt<char32_t, char, _Mbstatet>
1> ^
1> 14 errors generated.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Clang 3.6 doesn't support the C++11 keywords char16_t and char32_t in Microsoft mode (see the source). However good news, 3.7 does and will be released in three weeks (August 21) according to the LLVM website. In the meanwhile you could install a 3.7 release candidate or a snapshot build.

Error compiling OpenSSL for Win32

I get the following error when trying to build OpenSSL on Win32:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : error C2220: warning treated as error - no 'object' file generated
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefinition
tmp32\e_os.h(153) : see previous definition of 'EADDRINUSE'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
I've followed the instructions in INSTALL.W32 to the letter. I configured with the no-asm flag. I am using Visual Studio Express 2010 C++.
Thank you for your time.
Apparently this a bug in OpenSSL 1.0.0. I downloaded the 1.0.0a source and it is compiling fine.

Resources