### Qualified's blog

By Qualified, history, 13 months ago,

The title says it all...

• +10

 » 13 months ago, # | ← Rev. 2 →   0 First, navigate to the stdc++.h file. This will be located at a directory similar to C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++\mingw32\bits. Right click while pressing Shift to open a Powershell/cmd window there. Run the command g++ -std=c++17 stdc++.h, to compile the header. Take care to use the same flags you used in your build system(i.e use c++14 in command if you have build up of c++14). Check to make sure that the stdc++.h.gch file was created in the directory. Also,use "bits/stdc++.h" instead of in header
•  » » 13 months ago, # ^ | ← Rev. 3 →   +1 Thanks, man! This is so fast! BTW, runs in the same time as "bits/stdc++.h" so what is the difference?
•  » » » 13 months ago, # ^ |   0 Actually I have read in this blog Link,according to this "bits/stdc++.h" use precompiled headers whereas doesn't. IDK what's actual mechanism happening but in my case "bits/stdc++.h" working very good so I recommend that.
•  » » » » 13 months ago, # ^ |   0 'Take care to use the flags' what is this step mean ? And how can I be sure that I'm using the precompiled headers rajkumar62506
•  » » » » » 13 months ago, # ^ |   0 1)take care of flags means which c++ version you are using.if you are using c++14 then run command will be g++ -std=c++14 stdc++.h. 2)This info you can find on google by reading few blogs,once I was searching about precompiling header I was found it but I was not understood.But I can easily detect it by huge difference in compiling time.
•  » » » » » » 13 months ago, # ^ |   0 Thanks mate !
•  » » » 13 months ago, # ^ |   0
•  » » 12 months ago, # ^ |   0 I am not seeing any difference btw before and after doing this. My code get executed in 1.2 sec
•  » » 7 months ago, # ^ |   0 How to Create stdc++.h.gch, it's not there !! Also, I wanted to ask will I have to do Pre-Compilation every time I start my PC, and it would remain preloaded in every compilation. I am asking this because till now I'm unable to do it.
•  » » » 7 months ago, # ^ |   0 When you compile the bits/stdc++.h file, the stdc++.h.gch gets created. Make sure that it is in the same directory as the one in which your c++ files are. Also, use #include "bits/stdc++.h" instead of #include in your c++ programs. And yeah, you don't have to precompile the header file everytime.
 » 4 months ago, # |   0 For Linux Users Go to /usr/include/x86_64-linux-gnu/c++/9/bits For Windows Users Go to C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++\mingw32\bits Then run this command g++ -std=c++17 stdc++.h in your terminal or cmd, it will create stdc++.h.gch file. That's all. It will boost your compile time 8x faster.
•  » » 2 weeks ago, # ^ |   0 Thanks a lot, I was searching for this in Ubuntu!
•  » » » 2 weeks ago, # ^ |   0 Or you guys could run the whereis bits search and compile after cd ing in the bits directory ^_^ bits location in my case /usr/include/bits
 » 6 weeks ago, # |   0 Doing this is still not working for me :( Can someone please suggest what else I can do? Please!
 » 6 weeks ago, # |   0 I use this "shell_cmd": "g++ -std=c++17 ${file} -o${file_base_name}.exe && \${file_base_name}.exe" in the sublime-build file. What command should I use to compile stdc++.h ?......I have tried g++ -std=c++17 stdc++.h , but I don't see any noticeable difference in compilation time.