Visual C++: Windows and Console Subsystems
Subsystem The Subsystem option can be found in any Visual C++ project here: Project → Properties → Linker → System → Subsystem. The choice of Subsystem decides the execution environment for the...
View ArticleVisual C++: Creating a New Configuration
Creating a new configuration for compilation in Visual C++ is easy! For example, say I want to create a new configuration that is same as Release mode, except I want assert() to be compiled. To do...
View ArticleCUDA: LNK2005 Linker Errors
The Problem When building a Visual Studio solution which has CUDA source files (*.cu), LNK2005 linker errors of the following kind might be seen: LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl...
View ArticleCGAL: GMP and MPFR Linker Errors
Problem Compiling any Visual C++ solution that uses CGAL produces either or both of these errors: 1>LINK : fatal error LNK1104: cannot open file 'gmp-vc90-mt.lib' 1>LINK : fatal error LNK1104:...
View ArticleVisual C++: Assert in Release Mode
Problem In Visual C++, assertions are disabled in Release mode and enabled in Debug mode of the solution. I find assertions to be cheap and effective means of capturing programmer errors and would like...
View ArticleC++: pragma once
With both Visual C++ and GCC supporting pragma once completely, I do not see any reason to still use the include guards. Include guards were always a messy solution and I am glad that their death...
View ArticleLNK2038 Linker Error in Visual C++
Problem I got this error at the linking stage of compiling a Visual C++ project: Error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj This project...
View ArticleHow to build RDKit on Windows
RDKit is a cheminformatics library with a C++ and Python API. You typically need to build it only if you need to use the C++ API on Windows. Here are the steps that worked for me: 1. Install Python and...
View ArticleHow to use Armadillo on Windows
Armadillo is a C++ template library for linear algebra. It is built upon LAPACK and BLAS. It offers a simple API that is similar to that of Matlab. 1. Download the source code of Armadillo from here....
View ArticleHow to change working directory in Visual Studio
When developing a C++ program using Visual Studio, you typically compile and run it from the Visual Studio IDE. By default, when you do this, the executable is run with the working directory being the...
View Article