Question:
I keep getting this error message whenever I try to compile anything in Microsoft C/C++ express?...?
Broseph
2010-09-03 10:38:51 UTC
I keep getting this error message...:

fatal error C1083: Cannot open include file: 'sys/stdbool.h': No such file or directory

In the library folder for microsoft where all the headers are, I added the "stdbool.h" header, but this still shows up

What do i do?
Four answers:
?
2010-09-03 12:24:25 UTC
There is no sys/stdbool.h in C or C++. There's stdbool.h in C, but Microsoft does not support modern C (which is at odds with their excellent support of modern C++)



Either way, if you're adding a header file that is not a part of the development environment, it is very poor practice to place it in the system directories. It's your file, not Microsoft's file. Depending on where you got it from, it is very likely that it uses conventions that make it incompatible with the rest of MSVC's system include files.



Make it a part of your project instead. For example, this google hit is somebody's "msvc workaround" version of stdbool.h https://svn.win.tue.nl/trac/MCRL2/browser/trunk/build/workarounds/msvc/stdbool.h?rev=2064
Robert
2010-09-03 10:42:58 UTC
If you are using any of the MS Visual Studio products, there is always a chance that they can become corrupt during normal usage. It has become much less a problem recently, but I have seen it happen.



I would say first step is to troubleshoot: Copy your project to another system(via shared drive or USB) and see if you can compile it on that system. If you can, then it is an issue with the system, if not, then your project has the issue.



If your system has the issue, then you might want to try the repair feature in Visual studio.
ridler
2016-10-23 06:50:08 UTC
From the form of distinctive blunders messages you're transforming into it ought to be that the setting up has been corrupted. you will possibly be greater advantageous off repairing it. flow to regulate Panel and then "classes and constructive aspects" or "Uninstall a software" reckoning on your abode windows version. locate Microsoft workplace in the record of classes and precise click on it. Then choose for "replace" from the menu. From the verbal replace field that looks choose for "fix".
Ratchetr
2010-09-03 10:49:46 UTC
If you put it directly in the include folder, it won't find it.

It is looking for in in the sys folder.

Your include folder should already have a sys sub-folder, so just move the file there.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...