_WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)


All replies

  • Are you running 64 bit? If so you should try compiling the program in x86 mode.
    Saturday, May 12, 2012 8:22 PM
  • Interesting suggestion.  Where, exactly, does one set that?  I've looked around the Properties settings already.  Must have missed it.
    Saturday, May 12, 2012 8:46 PM
  • It's in the Project properties under the Build tab at the combo box "Platform Target".
    Sunday, May 13, 2012 1:02 AM
  • Now I'm even more confused.  The Project Properties dialog has no tabs.  It is a tree-view with Common properties and Configuration properties, and none of the entries say "Build".  One says Build Events, and it expands to Pre-Build, Pre-Link, and Post-Build.  Those are all empty.  I have Visual Studio 2010 Professional.

    Also, I have a W7-64-bit system but I want to compile for a range of platforms, not all of them 64 bit.  If I set x86 mode, will 32-bit platforms be able to run the code?

    Sunday, May 13, 2012 12:27 PM
  • Here are some pictures of how to do it:

    Step 1:

    Step 2:

    By the way, the x86 build runs on 32 and 64 bit.

    Sunday, May 13, 2012 7:09 PM
  • While I appreciate the effort going into the above reply, the confusion only gets worse.  I click on the Property menu item, as you show, and here is what I get:

    There is nothing there that says "Application, Build", and so on.  Are we talking about the same system?  I have Visual Studio 2010.

    My linker command line says

    /OUT:".\Debug\SYNOPSYS200v14.exe" /NOLOGO /MANIFEST /ManifestFile:".\Debug\SYNOPSYS200v14.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /PDB:"C:\SYNOPSYSV14\Debug\SYNOPSYS200v14.pdb" /PGD:"C:\SYNOPSYSV14\Debug\SYNOPSYS200v14.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE

    so I think it is already set up for X86.  Perhaps that is not the reason for my original problem and question.  Do you have any other ideas?

    Monday, May 14, 2012 2:39 PM
  • Since this is a C++ project, to find the equivalent settings related to ‘x86’, click on top-right “Configuration Manager” button.

    But the message related to unspecified definition is probably a warning, not an error. To solve it try adding the next line to your “StdAfx.h”:

    #include <SDKDDKVer.h>

    If you create an experimental project, you can see how “StdAfx.h” looks by default.

    Try asking for more details in a C++ forum.

    See also:

    Monday, May 14, 2012 6:18 PM