I have a very simple program that I am trying to compile before I build it out any further. I am trying to learn COM so following along here, I create app.h and app.cpp file in VS 2017 and using the ATL Template. When I try to build the solution I get a lot of MIDL 200 redefinition errors.
UPDATE (Based on #Roman R.'s response) Note that if I used cl /LD app.cpp on a Dev Command Line, I am able to generate app.dll correctly. The MIDL 2003 redefinition errors show up only when trying to build the solution through Visual Studio. I am working with VS 2017 Community edition, so not sure if other versions of Visual Studio have the same problem.
My Include path is simply inherited from the parent defaults i.e. the standard $(VC_IncludePath) and $(WindowsSDK_IncludePath). My Windows SDK version is 10.0.17763.0 and MSVC version is 14.16.27023
//app.h
#pragma once
#define STRICT
#ifndef _WINVER
#define _WINVER 0x0A00
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0A00
#endif
#define _USRDLL
#define _ATL_ATTRIBUTES
#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#include <SDKDDKVer.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <atltypes.h>
#include <atlctl.h>
#include <atlhost.h>
using namespace ATL;
//app.cpp
#include "app.h"
[module(dll, name = "app", helpstring = "APP 1.0 Type Library")];
[emitidl];
When I try to build the solution, I get a lot of MIDL2003 errors; snippet from Debug\app.log below:
Microsoft (R) 32b/64b MIDL Compiler Version 8.01.0622
Copyright (c) Microsoft Corporation. All rights reserved.
Processing .\vc140.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\wtypes.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\wtypesbase.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\basetsd.h
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\guiddef.h
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\prsht.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\objidl.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\unknwn.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\propidlbase.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\oaidl.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\urlmon.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\oleidl.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\servprov.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\msxml.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\propidl.idl
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(56): error MIDL2003: redefinition : tagVersionedStream
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(60): error MIDL2003: redefinition : PROPSETFLAG_DEFAULT
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(61): error MIDL2003: redefinition : PROPSETFLAG_NONSIMPLE
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(62): error MIDL2003: redefinition : PROPSETFLAG_ANSI
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(64): error MIDL2003: redefinition : PROPSETFLAG_UNBUFFERED
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(66): error MIDL2003: redefinition : PROPSETFLAG_CASE_SENSITIVE
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(70): error MIDL2003: redefinition : PROPSET_BEHAVIOR_CASE_SENSITIVE
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(90): error MIDL2003: redefinition : tagCAC
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(91): error MIDL2003: redefinition : tagCAUB
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(92): error MIDL2003: redefinition : tagCAI
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(93): error MIDL2003: redefinition : tagCAUI
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(94): error MIDL2003: redefinition : tagCAL
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(95): error MIDL2003: redefinition : tagCAUL
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(96): error MIDL2003: redefinition : tagCAFLT
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(97): error MIDL2003: redefinition : tagCADBL
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(98): error MIDL2003: redefinition : tagCACY
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(99): error MIDL2003: redefinition : tagCADATE
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(100): error MIDL2003: redefinition : tagCABSTR
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(101): error MIDL2003: redefinition : tagCABSTRBLOB
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(102): error MIDL2003: redefinition : tagCABOOL
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(103): error MIDL2003: redefinition : tagCASCODE
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(104): error MIDL2003: redefinition : tagCAPROPVARIANT
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(105): error MIDL2003: redefinition : tagCAH
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(106): error MIDL2003: redefinition : tagCAUH
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(107): error MIDL2003: redefinition : tagCALPSTR
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(108): error MIDL2003: redefinition : tagCALPWSTR
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(109): error MIDL2003: redefinition : tagCAFILETIME
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(110): error MIDL2003: redefinition : tagCACLIPDATA
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(111): error MIDL2003: redefinition : tagCACLSID
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(276): error MIDL2003: redefinition : tag_inner_PROPVARIANT
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(309): error MIDL2003: redefinition : PID_DICTIONARY
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(310): error MIDL2003: redefinition : PID_CODEPAGE
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(311): error MIDL2003: redefinition : PID_FIRST_USABLE
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(312): error MIDL2003: redefinition : PID_FIRST_NAME_DEFAULT
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(313): error MIDL2003: redefinition : PID_LOCALE
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(314): error MIDL2003: redefinition : PID_MODIFY_TIME
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(315): error MIDL2003: redefinition : PID_SECURITY
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(316): error MIDL2003: redefinition : PID_BEHAVIOR
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(317): error MIDL2003: redefinition : PID_ILLEGAL
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(319): error MIDL2003: redefinition : PID_MIN_READONLY
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(320): error MIDL2003: redefinition : PID_MAX_READONLY
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(322): error MIDL2003: redefinition : PRSPEC_INVALID
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(323): error MIDL2003: redefinition : PRSPEC_LPWSTR
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(324): error MIDL2003: redefinition : PRSPEC_PROPID
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(339): error MIDL2003: redefinition : tagPROPSPEC
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(348): error MIDL2003: redefinition : tagSTATPROPSTG
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(368): error MIDL2003: redefinition : tagSTATPROPSETSTG
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(377): error MIDL2003: redefinition : IPropertyStorage
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(509): error MIDL2003: redefinition : IPropertySetStorage
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(546): error MIDL2003: redefinition : IEnumSTATPROPSTG
c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\propidlbase.idl(586): error MIDL2003: redefinition : IEnumSTATPROPSETSTG
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ocidl.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\comcat.idl
Processing C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\include\atliface.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\oleacc.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\shtypes.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\MsHTML.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\dimm.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\dispex.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\dxgitype.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\dxgicommon.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\dxgiformat.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\MsHtmHst.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\docobj.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ExDisp.idl
Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ObjSafe.idl
.\vc140.idl(38): warning MIDL2214: semantic check incomplete due to previous errors
LINK : fatal error LNK1240: failed to compile IDL content
First of all, using ATL attributes is not a good idea overall. You are referring to MSDN section which belongs to Visual Studio 2008, and ATL attributes were deprecated soon.
An edit of MyIncludes.h that worked for me with latest VS2017 (the rest is per the walkthrough steps):
#pragma once
#include <sdkddkver.h> // <<--- This is the actual edit compared to MSDN article
#define _USRDLL
#define _ATL_ATTRIBUTES
#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <atltypes.h>
#include <atlctl.h>
#include <atlhost.h>
using namespace ATL;
Related
After I run the following command:
msbuild /p:Configuration=Win8_Release /p:Platform=x64 /t:sdv /p:inputs="/check /debug"
I got the following errors in smvbuild.log:
Task "Link"
C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\smv\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\BexWinCj.sys" /VERSION:"10.0" /INCREMENTAL:NO /NOLOGO /WX /SECTION:"INIT,d" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\BufferOverflowFastFailK.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\ntoskrnl.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\hal.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\wmilib.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\BufferOverflowFastFailK.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\ntoskrnl.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\hal.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\km\x64\wmilib.lib" /NODEFAULTLIB /MANIFEST:NO /DEBUG /PDB:"C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\BexWinCj.pdb" /SUBSYSTEM:NATIVE,"10.00" /Driver /OPT:REF /OPT:ICF /ENTRY:"GsDriverEntry" /RELEASE /IMPLIB:"C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\BexWinCj.lib" /MERGE:"_TEXT=.text;_PAGE=PAGE" /MACHINE:X64 /PROFILE /guard:cf /kernel /IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221,4108,4088,4218,4218,4235 /osversion:10.0 /pdbcompress /debugtype:pdata C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjMessage.res
C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjConfigMgr.obj
C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjController.obj
C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjJournalMgr.obj
C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjMain.obj
C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjUtility.obj
C:\BEXbuild\build\builder\WindowsCJ_win10SDK_v142\src\VOLFLT\x64\Win8_Release\CjVolfilter.obj
Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at SmvInterceptorWrapper.Program.Main(String[] args)
I have checked the files in the link command, they all exist.
Does anyone know how to deal with this SDV InterceptedBuild error?
I encountered this too. Following advice at http://answers.flyppdevportal.com/MVC/Post/Thread/fa1eac9a-7231-41c9-9bbf-9f929dbfe75c?category=wdk, upgraded to VS2019 v16.6, problem solved.
I am trying to install pip install rasa_core and already added C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin; in my system path variable.
How can I resolve this error?
Following is my output while installing the rasa_core:
-3.5\twisted\internet\test\fake_CAs
copying src\twisted\mail\test\rfc822.message -> build\lib.win-amd64-3.5\twis
ted\mail\test
copying src\twisted\python\test\_deprecatetests.py.3only -> build\lib.win-am
d64-3.5\twisted\python\test
copying src\twisted\words\im\instancemessenger.glade -> build\lib.win-amd64-
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\x86_amd64\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 -ID:\Anaconda\envs\chatbot_p35\inc
lude -ID:\Anaconda\envs\chatbot_p35\include "-IC:\Program Files (x86)\Microsoft
Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.
14393.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um"
"-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Pro
gram Files (x86)\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files (x
86)\Windows Kits\10\include\10.0.14393.0\winrt" /Tcsrc/twisted/test/raiser.c /Fo
build\temp.win-amd64-3.5\Release\src/twisted/test/raiser.obj
raiser.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.ex
e /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPA
TH:D:\Anaconda\envs\chatbot_p35\libs /LIBPATH:D:\Anaconda\envs\chatbot_p35\PCbui
ld\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\am
d64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB
\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.14393.0\ucrt\x
64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/L
IBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.14393.0\um\x64" /EXPORT:P
yInit_raiser build\temp.win-amd64-3.5\Release\src/twisted/test/raiser.obj /OUT:b
uild\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 LNK1171: unable to load mspdb140.dll (error code: 127)
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B
IN\\x86_amd64\\link.exe' failed with exit status 1171
I am trying to install Fancyimpute on anaconda py3.6, win 10, 64 Bit. Getting the following error.
Collecting fancyimpute
Requirement already satisfied: downhill in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: numpy>=1.10 in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: scikit-learn>=0.17.1 in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: theano in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: scipy in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: climate in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: knnimpute in c:\anaconda3\lib\site-packages (from fancyimpute)
Requirement already satisfied: six in c:\anaconda3\lib\site-packages (from fancyimpute)
Collecting cvxpy (from fancyimpute)
Using cached cvxpy-0.4.10-py3-none-any.whl
Requirement already satisfied: click in c:\anaconda3\lib\site-packages (from downhill->fancyimpute)
Requirement already satisfied: plac in c:\anaconda3\lib\site-packages (from climate->fancyimpute)
Requirement already satisfied: scs>=1.1.3 in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Requirement already satisfied: fastcache in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Requirement already satisfied: CVXcanon>=0.0.22 in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Requirement already satisfied: toolz in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Collecting ecos>=2 (from cvxpy->fancyimpute)
Using cached ecos-2.0.4.tar.gz
Requirement already satisfied: multiprocess in c:\anaconda3\lib\site-packages (from cvxpy->fancyimpute)
Requirement already satisfied: dill>=0.2.6 in c:\anaconda3\lib\site-packages (from multiprocess->cvxpy->fancyimpute)
Building wheels for collected packages: ecos
Running setup.py bdist_wheel for ecos: started
Running setup.py bdist_wheel for ecos: finished with status 'error'
Complete output from command C:\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-build-99u1p4_i\\ecos\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Akshay\AppData\Local\Temp\tmpdmxhbqacpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying src\ecos.py -> build\lib.win-amd64-3.6
running build_ext
building '_ecos' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
creating build\temp.win-amd64-3.6\Release\ecos
creating build\temp.win-amd64-3.6\Release\ecos\external
creating build\temp.win-amd64-3.6\Release\ecos\external\ldl
creating build\temp.win-amd64-3.6\Release\ecos\external\ldl\src
creating build\temp.win-amd64-3.6\Release\ecos\src
creating build\temp.win-amd64-3.6\Release\ecos\external\amd
creating build\temp.win-amd64-3.6\Release\ecos\external\amd\src
creating build\temp.win-amd64-3.6\Release\ecos\ecos_bb
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc/ecosmodule.c /Fobuild\temp.win-amd64-3.6\Release\src/ecosmodule.obj
ecosmodule.c
ecos/include\ecos_bb.h(72): warning C4005: 'INFINITY': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): note: see previous definition of 'INFINITY'
ecos/include\ecos_bb.h(74): warning C4005: 'isinf': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(263): note: see previous definition of 'isinf'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcecos/external/ldl/src/ldl.c /Fobuild\temp.win-amd64-3.6\Release\ecos/external/ldl/src/ldl.obj
ldl.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
ecos/external/SuiteSparse_config\../../include/glblopts.h(58): note: see previous definition of 'INFINITY'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
ecos/external/SuiteSparse_config\../../include/glblopts.h(53): note: see previous definition of 'NAN'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcecos/src/cone.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/cone.obj
cone.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcecos/src/ctrlc.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/ctrlc.obj
ctrlc.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcecos/src/ecos.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/ecos.obj
ecos.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
ecos/src/ecos.c(1093): warning C4013: '_set_output_format' undefined; assuming extern returning int
ecos/src/ecos.c(1093): error C2065: '_TWO_DIGIT_EXPONENT': undeclared identifier
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
Running setup.py clean for ecos
Failed to build ecos
Installing collected packages: ecos, cvxpy, fancyimpute
Running setup.py install for ecos: started
Running setup.py install for ecos: finished with status 'error'
Complete output from command C:\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-build-99u1p4_i\\ecos\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Akshay\AppData\Local\Temp\pip-mgnxokqc-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying src\ecos.py -> build\lib.win-amd64-3.6
running build_ext
building '_ecos' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
creating build\temp.win-amd64-3.6\Release\ecos
creating build\temp.win-amd64-3.6\Release\ecos\external
creating build\temp.win-amd64-3.6\Release\ecos\external\ldl
creating build\temp.win-amd64-3.6\Release\ecos\external\ldl\src
creating build\temp.win-amd64-3.6\Release\ecos\src
creating build\temp.win-amd64-3.6\Release\ecos\external\amd
creating build\temp.win-amd64-3.6\Release\ecos\external\amd\src
creating build\temp.win-amd64-3.6\Release\ecos\ecos_bb
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc/ecosmodule.c /Fobuild\temp.win-amd64-3.6\Release\src/ecosmodule.obj
ecosmodule.c
ecos/include\ecos_bb.h(72): warning C4005: 'INFINITY': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): note: see previous definition of 'INFINITY'
ecos/include\ecos_bb.h(74): warning C4005: 'isinf': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(263): note: see previous definition of 'isinf'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcecos/external/ldl/src/ldl.c /Fobuild\temp.win-amd64-3.6\Release\ecos/external/ldl/src/ldl.obj
ldl.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
ecos/external/SuiteSparse_config\../../include/glblopts.h(58): note: see previous definition of 'INFINITY'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
ecos/external/SuiteSparse_config\../../include/glblopts.h(53): note: see previous definition of 'NAN'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcecos/src/cone.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/cone.obj
cone.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcecos/src/ctrlc.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/ctrlc.obj
ctrlc.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON -DDLONG -DLDL_LONG -DCTRLC=1 -Iecos/include -IC:\Anaconda3\lib\site-packages\numpy\core\include -Iecos/external/amd/include -Iecos/external/ldl/include -Iecos/external/SuiteSparse_config -IC:\Anaconda3\include -IC:\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-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)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcecos/src/ecos.c /Fobuild\temp.win-amd64-3.6\Release\ecos/src/ecos.obj
ecos.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(78): warning C4005: 'INFINITY': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(58): note: see previous definition of 'INFINITY'
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\math.h(82): warning C4005: 'NAN': macro redefinition
c:\users\akshay\appdata\local\temp\pip-build-99u1p4_i\ecos\ecos\include\glblopts.h(53): note: see previous definition of 'NAN'
ecos/src/ecos.c(1093): warning C4013: '_set_output_format' undefined; assuming extern returning int
ecos/src/ecos.c(1093): error C2065: '_TWO_DIGIT_EXPONENT': undeclared identifier
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for ecos
Command "C:\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-build-99u1p4_i\\ecos\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Akshay\AppData\Local\Temp\pip-mgnxokqc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Akshay\AppData\Local\Temp\pip-build-99u1p4_i\ecos\
The error has something to do with the following -
Failed building wheel for ecos
Initially it was showing me error with the visual studio c++ and after installation of VS 2015 C++ Build Tools it still gave a similar error, but this time if was due to something else. I haven't been able to figure out a way to fix this. Will appreciate some help with this.
Thanks in advance!
Ran into the same problem (ecos 2.0.4) and came upon this thread: ecos python issue
Solved the problem by manually downloading the appropriate .whl file (Python version and Windows architecture): Windows binaries
Navigated to the downloaded file (in terminal) and ran pip install filename.whl.
I've been trying to add the pyldap package using pip from the command line :
pip install pyldap
But i'm getting this error :
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.25.1 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -Ic:\python\include -Ic:\python\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcModules/LDAPObject.c /Fobuild\temp.win32-3.6\Release\Modules/LDAPObject.obj
LDAPObject.c
c:\users\myUser\appdata\local\temp\pip-build-tzxw0vq9\pyldap\modules\errors.h(8): fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe' failed with exit status 2
I've installed OpenLDAP for Windows, but it didn't change a thing.
Can pyldap be install on windows 10? Am i missing a prerequisite?
I've managed to install the pyldap package using the wheel file from this website :
Gohlke's wheels
I cannot include WinSock2.h in a msvc++2010 project. At first I though it was something I was doing wrong, so I created an empty project to test my sanity. The empty project is as follows
#include <Windows.h>
#include <WinSock2.h>
int main(void){
system("echo Hello World");
system("pause");
return 0;
};
It compiles and works fine without the line #include <WinSock2.h> but it fails with a long list of errors when I do try and include WinSock2.h.
Errors:
1> Main.cpp
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(91): warning C4005: 'AF_IPX' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(460) : see previous definition of 'AF_IPX'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(131): warning C4005: 'AF_MAX' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(479) : see previous definition of 'AF_MAX'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(168): warning C4005: 'SO_DONTLINGER' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(402) : see previous definition of 'SO_DONTLINGER'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(212): error C2011: 'sockaddr' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(485) : see declaration of 'sockaddr'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(390): error C2059: syntax error : 'constant'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(390): error C3805: 'constant': unexpected token, expected either '}' or a ','
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(524): warning C4005: 'IN_CLASSA' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(287) : see previous definition of 'IN_CLASSA'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(530): warning C4005: 'IN_CLASSB' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(293) : see previous definition of 'IN_CLASSB'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(536): warning C4005: 'IN_CLASSC' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(299) : see previous definition of 'IN_CLASSC'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(547): warning C4005: 'INADDR_ANY' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(304) : see previous definition of 'INADDR_ANY'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(549): warning C4005: 'INADDR_BROADCAST' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(306) : see previous definition of 'INADDR_BROADCAST'
1>c:\program files\microsoft sdks\windows\v7.0a\include\ws2def.h(583): error C2011: 'sockaddr_in' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(312) : see declaration of 'sockaddr_in'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(132): error C2011: 'fd_set' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(68) : see declaration of 'fd_set'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(167): warning C4005: 'FD_SET' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(102) : see previous definition of 'FD_SET'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(176): error C2011: 'timeval' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(111) : see declaration of 'timeval'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(232): error C2011: 'hostent' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(167) : see declaration of 'hostent'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(245): error C2011: 'netent' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(180) : see declaration of 'netent'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(252): error C2011: 'servent' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(187) : see declaration of 'servent'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(264): error C2011: 'protoent' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(199) : see declaration of 'protoent'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(360): error C2011: 'WSAData' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(322) : see declaration of 'WSAData'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(458): error C2011: 'sockproto' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(494) : see declaration of 'sockproto'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(500): error C2011: 'linger' : 'struct' type redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(531) : see declaration of 'linger'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(513): warning C4005: 'SOMAXCONN' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(544) : see previous definition of 'SOMAXCONN'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(542): warning C4005: 'FD_READ' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(562) : see previous definition of 'FD_READ'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(545): warning C4005: 'FD_WRITE' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(563) : see previous definition of 'FD_WRITE'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(548): warning C4005: 'FD_OOB' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(564) : see previous definition of 'FD_OOB'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(551): warning C4005: 'FD_ACCEPT' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(565) : see previous definition of 'FD_ACCEPT'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(554): warning C4005: 'FD_CONNECT' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(566) : see previous definition of 'FD_CONNECT'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(557): warning C4005: 'FD_CLOSE' : macro redefinition
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(567) : see previous definition of 'FD_CLOSE'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1578): error C2375: 'accept' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(742) : see declaration of 'accept'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1600): error C2375: 'bind' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(747) : see declaration of 'bind'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1619): error C2375: 'closesocket' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(752) : see declaration of 'closesocket'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1638): error C2375: 'connect' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(754) : see declaration of 'connect'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1659): error C2375: 'ioctlsocket' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(759) : see declaration of 'ioctlsocket'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1680): error C2375: 'getpeername' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(764) : see declaration of 'getpeername'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1701): error C2375: 'getsockname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(769) : see declaration of 'getsockname'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1724): error C2375: 'getsockopt' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(774) : see declaration of 'getsockopt'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1745): error C2375: 'htonl' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(781) : see declaration of 'htonl'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1762): error C2375: 'htons' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(783) : see declaration of 'htons'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1780): error C2375: 'inet_addr' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(785) : see declaration of 'inet_addr'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1797): error C2375: 'inet_ntoa' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(787) : see declaration of 'inet_ntoa'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1815): error C2375: 'listen' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(789) : see declaration of 'listen'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1833): error C2375: 'ntohl' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(793) : see declaration of 'ntohl'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1850): error C2375: 'ntohs' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(795) : see declaration of 'ntohs'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1870): error C2375: 'recv' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(797) : see declaration of 'recv'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1895): error C2375: 'recvfrom' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(803) : see declaration of 'recvfrom'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1921): error C2375: 'select' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(811) : see declaration of 'select'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1945): error C2375: 'send' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(818) : see declaration of 'send'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1970): error C2375: 'sendto' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(824) : see declaration of 'sendto'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(1996): error C2375: 'setsockopt' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(832) : see declaration of 'setsockopt'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2018): error C2375: 'shutdown' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(839) : see declaration of 'shutdown'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2039): error C2375: 'socket' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(843) : see declaration of 'socket'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2063): error C2375: 'gethostbyaddr' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(850) : see declaration of 'gethostbyaddr'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2083): error C2375: 'gethostbyname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(855) : see declaration of 'gethostbyname'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2101): error C2375: 'gethostname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(857) : see declaration of 'gethostname'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2121): error C2375: 'getservbyport' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(861) : see declaration of 'getservbyport'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2141): error C2375: 'getservbyname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(865) : see declaration of 'getservbyname'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2160): error C2375: 'getprotobynumber' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(869) : see declaration of 'getprotobynumber'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2178): error C2375: 'getprotobyname' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(871) : see declaration of 'getprotobyname'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2200): error C2375: 'WSAStartup' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(875) : see declaration of 'WSAStartup'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2219): error C2375: 'WSACleanup' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(879) : see declaration of 'WSACleanup'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2236): error C2375: 'WSASetLastError' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(881) : see declaration of 'WSASetLastError'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2253): error C2375: 'WSAGetLastError' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(883) : see declaration of 'WSAGetLastError'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2270): error C2375: 'WSAIsBlocking' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(885) : see declaration of 'WSAIsBlocking'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2287): error C2375: 'WSAUnhookBlockingHook' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(887) : see declaration of 'WSAUnhookBlockingHook'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2304): error C2375: 'WSASetBlockingHook' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(889) : see declaration of 'WSASetBlockingHook'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2321): error C2375: 'WSACancelBlockingCall' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(891) : see declaration of 'WSACancelBlockingCall'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2343): error C2375: 'WSAAsyncGetServByName' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(893) : see declaration of 'WSAAsyncGetServByName'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2370): error C2375: 'WSAAsyncGetServByPort' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(901) : see declaration of 'WSAAsyncGetServByPort'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2396): error C2375: 'WSAAsyncGetProtoByName' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(909) : see declaration of 'WSAAsyncGetProtoByName'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2421): error C2375: 'WSAAsyncGetProtoByNumber' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(916) : see declaration of 'WSAAsyncGetProtoByNumber'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2446): error C2375: 'WSAAsyncGetHostByName' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(923) : see declaration of 'WSAAsyncGetHostByName'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2473): error C2375: 'WSAAsyncGetHostByAddr' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(930) : see declaration of 'WSAAsyncGetHostByAddr'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2496): error C2375: 'WSACancelAsyncRequest' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(939) : see declaration of 'WSACancelAsyncRequest'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winsock2.h(2517): error C2375: 'WSAAsyncSelect' : redefinition; different linkage
1> c:\program files\microsoft sdks\windows\v7.0a\include\winsock.h(941) : see declaration of 'WSAAsyncSelect'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I am assuming that Microsoft would not distribute bad header files in their SDK, what's going on?
I believe you are getting these errors because windows.h will include winsock.h. Reverse the order of your includes so that WinSock2.h comes before windows.h. WinSock2.h has some #defines in it to keep windows.h from including winsock.h
I made sure that an #include "Winsock2.h" is before any #include "windows.h" and "#include "Winsock.h" and this solved the case.
Just a matter of patience, look at includes one by one and establish this order, first #include "Winsock2.h" then #include "windows.h"
I checked the recursive includes, I spotted the header files which include (recursively) some #include "windows.h" and "#include "Winsock.h"and write a#include "Winsock2.h". in this files, i added#include "Winsock2.h"` as the first include.