7

Visual Studio 2013 returns this error when I tried to build a Snare (http://www.intersectalliance.com/projects/BackLogNT/) project.

I installed the Windows SDK and I realized that I am supposed to include the SDK path into my project. Could anyone explain how to include the SDK path into a Visual Studio project?

Charles
  • 50,943
  • 13
  • 104
  • 142
Sai Wai Maung
  • 1,607
  • 6
  • 18
  • 28

5 Answers5

5

The answer by user2644318 is quite hardcoded. An alternative is to try this: - Open the Project properties - Goto Configuration Properties -> General - Set the Platform Toolset to v120_xp (Visual Studio 2013 - Windows XP) - Recompile

Funnily enough I can mix toolsets for libraries; they link fine. Ofcourse, this only gets you XP interface capabilities.

Ruud van Gaal
  • 133
  • 2
  • 8
4

I think answer of Ruud van Gaal is more correct. What I did: - install Windows SDK for Windows XP (7.1) from here http://www.microsoft.com/en-us/download/details.aspx?id=8279

  • open the Project properties - Goto Configuration Properties -> General - Set the Platform Toolset to "Visual Studio 2013 - Windows XP (v120_xp)"

  • after this Include/Libraries paths were changed to correct folders $(VC_IncludePath);$(WindowsSdk_71A_IncludePath); $(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86);

So I did NOT change them manually. Only targeting correct tool set and everything started to work.

3

In Visual Studio 2013, under Solution Explorer, right click on the project -> Properties -> Configuration Properties -> VC++ Directories, then include (WindowsSDK_IncludePath_um); in Include and Library Directories. I was able to solve this issue with this approach.

Sai Wai Maung
  • 1,607
  • 6
  • 18
  • 28
  • I tried installing the windows 7 and windows 8 SDKs, but this was the answer that resolved my problem. – maxp May 20 '14 at 09:03
0

I just downloaded and installed windows SDK 8.1 for my windows 7. VS2013 looks for winsock2.h header in C:\Program Files (x86)\Windows Kits\8.1 folder. This approach works for me.

Vahag Chakhoyan
  • 873
  • 1
  • 10
  • 21
0

If you are encountering the same problem in Visual Studio 2019, the problem might be that you started off with a completely blank project. It literally states that there are no starting files. So instead I created a new project based on any other than "Empty Project". Now I could find winsock-files in external dependencies.

It may sound like a lazy workaround, but it will save you from the startup headache of having to tamper with include paths.

Abdel Aleem
  • 667
  • 10
  • 15