VS2015 compilation error cannot open the file "stdio.h"

① Compile error and cannot open "# include <winsock2.h> and # include <ws2tcpip.h>", the solution: Project Properties-"Configuration Properties-"General-"Platform Toolset select XP items, such as: Visual Studio 2015 - Windows XP (v140_xp)

② When the compilation error cannot be opened "#include <stdio.h>, #include <stdlib.h>, #include <errno.h> and #include <signal.h>", the solution: need to be in, project properties - " Configuration Properties-"VC++ Directory-"Include directory to add: C:\Program Files\Windows Kits\10\Include\10.0.10150.0\ucrt

③. If it is some library opening problem, the solution: you need to add in the project properties - "configuration properties -" VC++ directory - "library directory: C:\Program Files\Windows Kits\10\Lib\10.0.10150.0\ucrt\ x86

④ Two ways to add link libraries:
1) #pragma comment(lib,"Name.lib")
2) Project-"Properties-"Linker (additional library directory and additional library; C/C++ additional include directory (add the corresponding path to the header file)

Guess you like

Origin blog.csdn.net/liangfei868/article/details/125612527