none
Vista SDK causes C2065: 'IPPROTO_IPV6' : undeclared identifier

    Question

  • I am running Studio 2005 SP1 on WinXP and I'm trying to compile my app for Vista. I needed access to the SetThreadUILanguage, so I installed the Vista SDK from MSDN. Without changing any source code I merely recompiled the app.

     

    Everything compiles OK except a proxy class that talks to a web service. The compiler automatically updates the web reference and #includes <atlsoap.h>, which is where the problem appears to begin. I then get two error messages:

     

    1>C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atlsocket.inl(130) : error C2065: 'IPPROTO_IPV6' : undeclared identifier

    1>C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\atldbcli.h(33) : fatal error C1083: Cannot open include file: 'msdaguid.h': No such file or directory

     

    The IDE include and library paths were correctly updated by running "Integrate Windows SDK with Visual Studio 2005" after installing the SDK, but the error message referring to 'msdaguid.h' is correct - the file does NOT exist in the Vista SDK include path, but DOES exist in the previous Platform SDK (which has now been removed from the include path). I would have hoped that the auto-generated web reference proxy class would compile correctly. And if I comment out the include of <atlsoap.h>, the above errors go away (and a lot of others appear, but further down in the file), which tells me this is indeed the line that causes the errors above.

     

    Any suggestions?

     

    Tuesday, May 1, 2007 8:20 PM

Answers

  • Ok, this is a known issue connected with SDK and VS 2005, I'm investigating it's status

     

    For Reference: IPPROTO_IPV6 is defined in ws2def.h. Furthermore, winsock2.h includes ws2def.h

     

    Now the coments:

     

    ".... In some cases, it doesn’t set the _WIN32_WINNT environment variable. Ws2def.h defines IPPROTO_IPV6 only if this env variable is set and is >= 0501......"

     

    further ".....if you would have selected an MFC project from the Visual Studio project wizard, the header file it generates sets this define and has a comment about its use. Unfortunately the Win32 project wizard doesn’t set this...."

    Monday, May 21, 2007 9:49 PM
  • This is a known issue and will be resolved in the next posted SDK which should be this summer (aka June).
    Friday, May 25, 2007 9:40 PM

All replies

  • You might check the info from the following articles

     

    Using the Windows Headers

    http://msdn2.microsoft.com/en-us/library/aa383745.aspx

     

    Also it is my understanding that IPPROTO_IPV6 is defined in ws2def.h. Furthermore, winsock2.h includes ws2def.h

     

     "IPv6 global unicast address not assigned to your computer after you install Windows XP Service Pack 2"

    http://support.microsoft.com/kb/886530

    Thursday, May 3, 2007 3:02 PM
  • Thank you for your suggestions, but they don't really answer why merely adding the Vista SDK to the Studio include path causes the compile error (and link error).

    Do I need to

    #define NTDDI_VERSION  NTDDI_LONGHORN
    #define WINVER  0x0600

    in order to use the Vista SDK? If so, that would likely make it impossible to support older customers running on Win2k and WinXP.

    Does the Vista SDK require the defines above?
    Thursday, May 3, 2007 6:11 PM
  • I have the same problem. Looks like there is a bug in SDK.
    Wednesday, May 9, 2007 8:41 PM
  • See the following:

     
    "msdaguid.h and msdasc.h missing in Vista SDK 6000.0.0"

     

    http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=266963

     

    If this identifies your issue, be sure to vote on the problem, and to check the work-around.

     

    Please post here if this work-around helps, so everyone who finds this thread will know.

     

    Thanks,

    Wednesday, May 9, 2007 9:30 PM
  • This is about "msdaguid.h and msdasc.h". What about "IPPROTO_IPV6" error?
    Wednesday, May 9, 2007 10:08 PM
  • I have heard that in some cases VS2005 may not set the _WIN32_WINNT environment variable. Ws2def.h defines IPPROTO_IPV6 only if this env variable is set and is >= 0501

     

    "#if(_WIN32_WINNT >= 0x0501). "

     

    Also make sure you have the lastest service packs for VS2005.

    Wednesday, May 9, 2007 10:26 PM
  • It works if you remove Vista SDK. So this is a bug in SDK.

     

    Wednesday, May 9, 2007 11:29 PM
  • You might try posting in the Vista Windows SDK forum.

    http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=121&SiteID=1

     

    Or see the following link for reporting a bug:

    http://support.microsoft.com/gp/contactbug

     

    Or contact your regional Partner Support for help troubleshooting the issue with you.

    Thursday, May 10, 2007 3:01 PM
  • I followed your advice and posted in Vista SDK forum but moderator deleted my post as duplicate. Nice.
    Saturday, May 12, 2007 3:30 PM
  • Ok, this is a known issue connected with SDK and VS 2005, I'm investigating it's status

     

    For Reference: IPPROTO_IPV6 is defined in ws2def.h. Furthermore, winsock2.h includes ws2def.h

     

    Now the coments:

     

    ".... In some cases, it doesn’t set the _WIN32_WINNT environment variable. Ws2def.h defines IPPROTO_IPV6 only if this env variable is set and is >= 0501......"

     

    further ".....if you would have selected an MFC project from the Visual Studio project wizard, the header file it generates sets this define and has a comment about its use. Unfortunately the Win32 project wizard doesn’t set this...."

    Monday, May 21, 2007 9:49 PM
  • See my previous post: it does work if you remove Vista SDK. So this is not an issue with VS 2005, it is Vista SDK issue.
    Tuesday, May 22, 2007 4:26 AM
  • And in my case the include file problems are caused by an auto-generated proxy class created by Studio when it updates a Web Reference (something I have no control over). And like Alex, mine works fine if you remove the Vista SDK.
    Tuesday, May 22, 2007 2:28 PM
  • This is a known issue and will be resolved in the next posted SDK which should be this summer (aka June).
    Friday, May 25, 2007 9:40 PM
  • Thanks - that's all I needed to know.
    Friday, May 25, 2007 9:52 PM
  •  

    Is this already fixed ? In the Vista SDK I downloaded a some weeks ago had same problem...
    Sunday, August 5, 2007 6:22 PM
  • It is supposed to be fixed in the next SDK release in June. It is August already and no fix. I guess we have to get used to Microsoft postponing everything.

    Sunday, August 5, 2007 6:33 PM
  • http://www.microsoft.com/downloads/details.aspx?FamilyId=74DD6E2D-89C6-4E1E-AF00-FC7D70F15439&displaylang=en

     

    Whoomp there it is...

     

    Quick Details

    File Name: 6.0.6001.16621.148.WindowsSDK_LonghornServer_IDS04_idw.WindowsSDK.DVD.Release.iso
    Version: 6.1
    Date Published: 7/30/2007
    Language: English
    Download Size: 1171.2 MB

    Sunday, August 5, 2007 6:35 PM
  • ----------------------------------------

    This release is for preview purposes only. The APIs, documentation, samples, headers, libraries, and tools provided in this release are preliminary and subject to change. Please use this prerelease of the Windows SDK only in a test environment and on a machine where any earlier pre-release version of the Windows SDK has been uninstalled.

    ------------------------------------------

     

    Do you really want to use prerelease software in production?

    Sunday, August 5, 2007 6:42 PM
  • I actually regret buying Visual Studio 2005.

    Spending $ 30.000 on a number of licenses and only getting more problems then with VC 6.0.

     

    The DevEnv behaves much slower on my 3.4Ghz duocore, then VC60 did on my 233Mhz.

     

    SourceSafe integration SUCKS, I have a lot of problems with projects which are added to different solutions. Spending hours! to get our solution of 100 projects to behave just right.

     

    double operations are different:

    VC 6 compared a < b and VC2005 compares b>=a so I get different errors when handling float exceptions.

    VC2005 works with -0.0.   -0.0 is NOT smaller then NUL, but Atan2 checks the sign and gives a 180 degree answer.

     

    Our application which worked for a couple of years, spontaneously shows a message box with an exclamation mark and a text from the stringtable when I press a toolbar button. Later it crashes.

     

    Our database configuration tool got veeery slow.

     

    Some VC60 CString method added a termination character when GetBuffer/ReleaseBuffer, VC2005 didn't and crashed the application.

     

     

    I actually dont dare to release software build with 2005.

    Should we get our moneyback and wait till Studio 2020 ?

     

    It's sad.....

     

     

    Sunday, August 5, 2007 7:00 PM
  •  

    Installed the August beta and still same problem.....
    Monday, August 6, 2007 8:38 PM
  • I had the same problem when compiling NTP.  Here is a quick fix:

     

    In Project Propery->Configuration Properies->C/C++->Command Line, add the following:

    /D "_WIN32_WINNT=0x0600" /D "WINVER=0x0600" /D "_WIN32_WINDOWS=0x0600" /D "_WIN32_IE=0x0600"

     

    Maybe _WIN32_IE is not necessary, but the others are.

    Sunday, March 23, 2008 9:23 AM