[英]Error using include sys/resource.h with Windows 10 C++
I have been using VS code on macOS for a while and switched to windows 10, I tried running a code from my mac but it's giving me this error that I don't get using mac.我一直在 macOS 上使用 VS 代码并切换到 Windows 10,我尝试从我的 mac 运行代码,但它给了我这个错误,我没有使用 mac。 I installed LLVM not sure if it would help.
我安装了 LLVM 不确定它是否有帮助。
#Include <sys/resource.h>
My compiler path currently is set to:我的编译器路径当前设置为:
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe",
Can I use the usual commands gcc/g++ this way?我可以这样使用常用命令 gcc/g++ 吗?
I am new to windows and not sure how to configure things in a clean ay.我是 Windows 新手,不确定如何以干净的方式配置东西。 Thanks.
谢谢。
sys/resource.h
is a POSIX header file, that's why your system is not able to find it anywhere on windows. sys/resource.h
是一个POSIX头文件,这就是为什么您的系统无法在 Windows 上的任何地方找到它。
If you still want to use it then you can either either use a virtual machine or install cygwin on your system.如果您仍然想使用它,那么您可以使用虚拟机或在您的系统上安装cygwin 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.