1. Error reporting
“Cannot open include file:” StdAfx. H “: no such file or directory”
The error here is that you included the header file # include generated by “StdAfx.h”. Presumably, you created an empty project but included this header file.
2. Solution
Method 1
replace the header file (this method is recommended, which is simpler); The contents of “StdAfx.h” are:
#include < stdio.h>
#include < tchar.h>
just delete your # include “StdAfx.h” here. Replace with what it contains. Namely:
#include < stdio.h>
#include < tchar.h>
method 2:
in your project, find the header file and add a header file named StdAfx.h: After adding successfully, click and add content:
#include < stdio.h>
#include < tchar.h>
save, compile again, and resolve the error~
Read More:
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] utils.c:33:18: fatal error: zlib.h: No such file or directory
- fatal error: libusb.h: No such file or directory [How to Solve]
- [Solved] 1.fatal error: NvInfer.h: No such file or directory
- [Solved] MSYS2+ fatal error: zlib.h: There is no such file or directory
- [Solved] Linux R Pack Error: cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
- [Solved] fatal error: bits/libc-header-start.h: No such file or directory
- [Solved] ROS fatal error: alsa/asoundlib. h: There is no such directory or file
- Centos pip install uwsgi error: “fatal error: Python.h: No such file or directory”
- [Solved] src/delly.h:8:42: fatal error: boost/graph/adjacency_list.hpp: No such file or directory
- C++: fatal error: variant: No such file or directory
- VSCode Unable to find custom header file directory: fatal error: no such file or directory
- crtdbg.h No such file or directory error [How to Solve]
- [Solved] fatal error: Eigen/Geometry: No such file or directory
- [Solved] VScode Run C++ File Error: fatal error:opencv2\core.hpp:No such file or diretory
- Containerd Error: btrfs/ioctl.h: No such file or directory
- [619]libgtk-3.so.0 or libXt.so.6: cannot open shared object file: No such file or directory
- [Solved] open failed: ENOENT (No such file or directory)
- [Solved] ERROR: Could not open requirements file: [Errno 2] No such file or directory : ‘requirments.txt‘