HaymanConsulting / OpenFAST-VS-build

Files needed to build OpenFAST on Windows using Visual Studio
Apache License 2.0
1 stars 1 forks source link

Problem building MAP_dll when a Windows SDK newer than 7.1a is installed on machine #1

Open HaymanConsulting opened 7 years ago

HaymanConsulting commented 7 years ago

We should include WinSock2.h in modules-ext/map/src to avoid compiling issues on Windows for people who only have the current Windows SDK on their machine or whose $(WindowsSDK_IncludePath) variable points to an SDK more recent than 7.1a.

I've fixed this on a Windows box by simply adding the path to the 7.1a include dir for my build box, i.e., C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include, in the MAP_dll project properties under VC++ Directories -> Include Directories.

But if we simply add WinSock2.h to the MAP_dll project, then the above fix is not needed and this solution would be valid for all Windows builds. We would need to exclude WinSock2.h from non-Windows builds.

HaymanConsulting commented 7 years ago

For now, I've added the file WinSock2.h to the Maplib folder of this repo and modified the MAP_dll.vcxproj file to point to it there. This is only a temporary fix for now.