How to Fix bits/stdc++.h file not found in MacOS
Разница между en3 и en4, 46 символ(ов) изменены
1. Install the Xcode app from App Store↵
2. Go to the path = `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1` To do this easily, open **Finder** and press Cmd+Shift+G and paste this path address and it should open up.↵
3. Create a folder named 
_**bits_**and go to this folder.↵
4. Create a file named **stdc++.h** inside the **bits** folder and open it using any text editor (e.g. TextEdit)↵
5. Paste the content from this repo to stdc++.h 
file:[stdc++.h](https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/include/precompiled/stdc++.h)↵
6. Now close _Sublime Text/VS Code_ and reopen it and run a C++ file.↵
7. It should work!↵
If it doesn’t work:↵
=================== 
 file: [stdc++.h](https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/include/precompiled/stdc++.h)↵
6. Now close **Sublime Text/VS Code**and reopen it and run a C++ file.↵
7. It should work!↵
### If it doesn’t work:

1. Try the same thing using path = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/↵
2. It should work now, but it might give you errors like **include<cstdalign>** is not found or similar. Just remove this include from the stdc++.h↵
-------- file and try again.↵
3.
 You might need to remove multiple includes and it should work eventually(at least it worked for me!). In my case, I had to remove the following lines from **stdc++.h**:↵
- include"cstdalign"↵
- include"cuchar"↵
- include"memory_resources"↵

If it still doesn’t work, try with path = /usr/local/include 

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en7 Английский AlgoDragon_ 2022-11-12 23:37:54 2 Tiny change: '.h file: `[stdc++.h]`(https://g' -> '.h file: [stdc++.h](https://g'
en6 Английский AlgoDragon_ 2022-11-12 23:37:08 4
en5 Английский AlgoDragon_ 2022-11-12 23:35:47 23
en4 Английский AlgoDragon_ 2022-11-12 23:33:02 46
en3 Английский AlgoDragon_ 2022-11-12 23:27:20 2 Tiny change: 'sources"\nIf it st' -> 'sources"\n\nIf it st'
en2 Английский AlgoDragon_ 2022-11-12 23:26:44 35
en1 Английский AlgoDragon_ 2022-11-12 23:24:22 1412 Initial revision (published)