EDIT
I have been educated about this topic and I have decided to close this question
P.S In the comments, can someone tell me how to close my question?
I have some simple C++ code here that I want to compile. I am currently on a mac with MacOS Big Sur running on my computer and I don't have the <bits/stdc++.h>
file as a "default" header available for all cpp
files. In order to add it I went in my /Library/Developer/CommandLineTools/usr/include/c++/v1
folder and made a bits
folder with a stdc++.h
file manually. However if I try to compile source code with this header included I get the following error:
test.cpp:1:10: fatal error: 'bits/stdc++.h' file not found
#include <bits/stdc++.h>
Here is my clang version as well:
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
What I want to achieve
- To compile the code successfully with my manually created
bits/stdc++.h
file. Preferably usingclang++
. - (If possible) Find a way to quickly do it.
What I've already tried
- I've already found this thread with similar question asked, but it the answers provided didn't work for me.
- I also Linking custom header files when compiling c++, but it seems irrelevant to my problem.
My source code
#include <bits/stdc++.h>
int main()
{
cout << "Meow Meow Meow\n";
return 0;
}