Following this post, I want to give the Checked_C project a try. So I installed the latest version from here, in the C:\Program Files\CheckedC-Clang
folder. Then trying this simple program:
#include <stdio_checked.h>
#include <stdchecked.h>
#pragma CHECKED_SCOPE ON
int main(int argc, nt_array_ptr<char> argv checked[] : count(argc)) {
puts("hello, world");
return 0;
}
but when trying to compile the program I get the error message:
In file included from hello-world.c:1:
C:\Program Files\CheckedC-Clang\lib\clang\12.0.1\include\stdio_checked.h:16:15: fatal error: 'stdio.h' file not found
#include_next <stdio.h>
^~~~~~~~~
1 error generated.
searching in the installation folder for dir /s stdio.h
I see that it is indeed available in the below path:
C:\Program Files\CheckedC-Clang\lib\clang\12.0.1\include
then tried to compile it with
clang hello-world.c -I"C:\Program Files\CheckedC-Clang\lib\clang\12.0.1\include"
to no avail.
I would appreciate it if you could help me know what is the problem and hope I can resolve it.