Automatically add all files in a folder to a target using CMake?

I am considering switching a cross platform project from separate build management systems in Visual C++, XCode and makefiles to CMake. One essential feature I need is to add automatically all files in a directory to a target. While this is easy to do with make, it is not easily doable with Visual C++ and … Read more

fatal error LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’

I’m using CUDA (VC++, Visual studio 2008sp1) to debug a FEM program. The program can only run on a Win32 platform, for the insufficiency of cuda. I think the library files linked are all compiled on the x86 platform, but when I compile it, I get the error message “fatal error LNK1112: module machine type … Read more

What does #defining WIN32_LEAN_AND_MEAN exclude exactly?

I found the explanation defining WIN32_LEAN_AND_MEAN “reduces the size of the Win32 header files by excluding some of the less frequently used APIs”. Somewhere else I read that it speeds up the build process. So what does WIN32_LEAN_AND_MEAN exclude exactly? Should I care about this pre-processor directive? Does it speed up the build process? I’ve … Read more

Unresolved external symbol in object files

During coding in Visual Studio I got an unresolved external symbol error and I’ve got no idea what to do. I don’t know what’s wrong. Could you please decipher me? Where should I be looking for what kind of errors? 1>Form.obj : error LNK2019: unresolved external symbol “public: class Field * __thiscall Field::addField(class Field *)” … Read more

Visual Studio 2010 – C++ project – remove *.sdf file

I would like to know if I can safely delete the sdf file that stores information for Visual Studios Intellisense – is it going to be rebuilt the next time that I open the solution? Do I lose anything by doing so? Is it possible to break the solution this way? The motivation to do … Read more

In Visual Studio C++, what are the memory allocation representations?

In Visual Studio, we’ve all had “baadf00d”, have seen seen “CC” and “CD” when inspecting variables in the debugger in C++ during run-time. From what I understand, “CC” is in DEBUG mode only to indicate when a memory has been new() or alloc() and unitilialized. While “CD” represents delete’d or free’d memory. I’ve only seen … Read more

Error “Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)”

I’ve installed Python 3.5 and while running pip install mysql-python it gives me the following error error: Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat) I have added the following lines to my Path C:\Program Files\Python 3.5\Scripts\; C:\Program Files\Python 3.5\; C:\Windows\System32; C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC; C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC … Read more

Why is this program erroneously rejected by three C++ compilers?

Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I am having some difficulty compiling a C++ program that I’ve written. This program is very simple and, to the best of my knowledge, conforms to all the rules … Read more