报错:
twilight@pc: ~/project/class/cv2021/build$ make
Consolidate compiler generated dependencies of target cv_hw1
[ 50%] Building CXX object CMakeFiles/cv_hw1.dir/cv_hw1.cpp.o
/home/twilight/project/class/cv2021/cv_hw1.cpp:6:9: fatal error: io.h: No such file or directory
#include<io.h>
^~~~~~
compilation terminated.
CMakeFiles/cv_hw1.dir/build.make:75: recipe for target 'CMakeFiles/cv_hw1.dir/cv_hw1.cpp.o' failed
make[2]: *** [CMakeFiles/cv_hw1.dir/cv_hw1.cpp.o] Error 1
CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/cv_hw1.dir/all' failed
make[1]: *** [CMakeFiles/cv_hw1.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2
问题:
在相应的头文件存放目录下没有该头文件,所以出错
解决办法:
sudo cp /usr/include/x86_64-linux-gnu/sys/io.h /usr/include
1万+

被折叠的 条评论
为什么被折叠?



