Thanks to lots of CPU cores available even in basic computer system we can significantly speed up compilation our projects. In a new article, you can look at techniques and experiments with building things faster in C++ Builder and a well-known free IDE DevC++.
This is an adapted guest post by Eli M and supported by Embarcadero.
You’ve just recompiled a 3rd party library in Visual Studio, copied the .lib file into a proper directory, added dependencies into your final project… recompiled and it worked nicely! Good. So now you can commit the changes into the main repository.
Then, unfortunately, you got a report from a build server (or from your colleague) that your recent change generated 10s of warning messages about some missing files from this new library… why is that?
When you write:
char strA = "Hexlo World!"; strA = 'l'; Everything works as expected. But what about:
char *strP = "Hexlo World!"; strP = 'l'; Do you think it will work correctly? If you are not sure, then I guess, you might be interested in the rest of article.
Include Guards, Pragma Once, Predeclarations and other hints that might be useful when dealing with includes.
What can we do with file including in C++? Do we need to put all the other header files of the project (plus third party libraries) in every file all the time? For sure there have to be some rules to manage that issue properly.