Sat 02 March 2019

Is it worth using make?

You may think you've created a nice and tidy Makefile, which tracks dependencies and works across many different operating systems, but ask yourself these questions (and answer honestly): Which compiler does your Makefile support? Is it GCC? Or Clang? Some of their options are pretty similar, so it may not … read more

This entry was tagged on #c++, #c, #cmake, #make, #meson and #rant

Thu 07 February 2019

C++: Shooting yourself in the foot #4

C++11 has introduced a better way to generate random numbers than the immortal srand(time(NULL)) and rand() % N method. However, this family of functions sometimes may behave in a not very intuitive way, especially when it comes to multi-platform programming. TL;DR: before commenting, please at least read … read more

This entry was tagged on #c++ and #rant

Thu 22 November 2018

Bringing Visual Studio compiler into MSYS2 environment

Hi, Using Windows is a painful experience for a command-line oriented person like me. Unfortunately, Windows doesn't offer any decent command-line oriented environment, because well, it has different goals, and that's understandable. The problem is when one is forced to use Windows when it's clear that those goals are incompatible … read more

This entry was tagged on #c++, #msys2, #visual_studio and #windows

Wed 21 November 2018

Generating preprocessed sources in CMake projects

Hi, It appears you can use CMake to quickly generate preprocessed source of your chosen .cpp file without modifying the CMakeLists.txt project file. This trick works only when your generator is make -- meaning, it won't work with the ninja builder. But still, if you're using make as your generator … read more

This entry was tagged on #c++ and #cmake

Page 1 / 10 »