简体   繁体   中英

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. I installed LLVM not sure if it would help.

#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?

I am new to windows and not sure how to configure things in a clean ay. Thanks.

sys/resource.h is a POSIX header file, that's why your system is not able to find it anywhere on windows.

If you still want to use it then you can either either use a virtual machine or install cygwin on your system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM