개발환경
- Windows 10 64-bit pro
- Visual Studio 2017
- Win32 console application
1. winsock2.h에 있는 qos.h파일을 못 찾는 에러
- Cannot open include file: 'qos.h': No such file or directory
1.1 원인
- C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared디렉토리에 qos.h파일이 없음
- Windows SDK 버전과도 관련이 있음(10.0.15063.0버전에서만 발생)
1.2 해결방법
- SDK버전을 바꾼다
2. SDK버전을 바꾸지 않고 컴파일을 시도했으나 여러가지 문제가 발생한다.
2.1 qos.h헤더파일 복사해 넣기
- 설치된 여러 SDK에서 qos.h파일을 복사해서 10.0.15063.0버전 디렉토리에 복사하기
- 설치된 SDK
C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\shared
- 컴파일은 되나 링크에러가 발생한다.
cannot open file 'gdi32.lib'
- SDK버전을 바꾸는 것이 제일 간단하다.
최신 SDK에 일부 필요한 헤더 파일과 라이브러리 파일들이 빠져 있는 것 같다.
3. Visual Studio 2017 인스톨러 설정 변경해서 SDK설치하기
- 오늘(2017, 5, 9) Visual Studio Installer옵션을 보다가 아래 옵션이 체크되어 있지 않은 것을 발견했다.
"Windows 10 SDK (10.0.15063.0) for Desktop x86 and x64"
- Visual Studio Installer실행 -> Summary -> Desktop development with C...
-> Visual C++ core desktop features
-> Windows 10 SDK (10.0.15063.0) for Desktop x86 and x64
- 위 항목을 체크헤서 Visual Studio 2017 설치를 수정하고 프로젝트 프라퍼티에서 Windows SDK Version을
10.0.15063.0으로 바꾼다.
컴파일과 링크가 정상적으로 된다.
'programming' 카테고리의 다른 글
Gradle을 이용해 만든 자바 프로그램 실행시 "Could not find or load main class 클래스이름"에러 발생 (0) | 2017.08.04 |
---|---|
Visual Studio 안드로이드 에뮬레이터 - Unable to determine the host ip address에러 (0) | 2017.05.18 |
SEGGER J-Link설치 (0) | 2017.04.09 |
Keil MDK-ARM (Lite/Evaluation version) 설치 (0) | 2017.04.09 |
DotNetCore.1.0.0-VS2015Tools.Preview2.exe 설치할 때 에러가 날 때 해결방법 (0) | 2016.07.29 |