Microsoft Studio Visual C++ 2013 (MSVC 12.0) is a commercial (free version available), integrated development environment (IDE) product from Microsoft for the C, C++, and C++/CLI programming languages.
Questions tagged [msvc12]
139 questions
0
votes
0 answers
Can you allow a class redefinition
I have a class that I am essentially trying to override from an included utility project that my project depends on.
I was hoping just creating the same class name in the main project would allow me to just simply overwrite the header that gets…

joequest1
- 37
- 3
0
votes
0 answers
Is there any compiler flags to make a default move constructor "empty" the moved parameter?
Since std::move() is just a cast operation, the default move constructor do not really empty the parameter. This lead to that I have to write all the move constructor by myself, which is boring and it's easy to make mistakes(for example I add a…
user2269707
0
votes
2 answers
C++ Union, garbage value
For the following code
#include
using namespace std;
union type
{
int a;
char b ;
};
int main()
{
type first;
first.b = 'a';
cout << first.a << " " << first.b << endl;
}
the output is -858993567 a (MSVC) or…

Abhay Patil
- 389
- 5
- 19
0
votes
0 answers
C++ Preprocessor do not show "expanded from"
Quick question:
My code makes extensive Code of macros, let's say it's a macro named X.
That macro takes some code as a parameneter, like that: X(const int i;)
If that code contains an error, most compilers give me a rather long error message,…
user10043112
0
votes
1 answer
vcproj for an .exe without same-named .c?
Don't I need a xxx.c source within a .vcproj to make xxx.exe? (How) Could MSVC create a .exe without a same-named .c source file?
Consider this .vcproj: it's creating winhugs.exe. The proj requires winhugs.h, which is in that folder, various other…

AntC
- 2,623
- 1
- 13
- 20
0
votes
0 answers
/md not dynamically linking printf using msvc
All I want is for printf to be dynamically linked to my exe file. Based on what I read, the switch /MD should be able to achieve that. However, when I look at the imports table, I do not see the printf function.

user1720897
- 1,216
- 3
- 12
- 27
0
votes
1 answer
How to identify function called from thread or process in msvc
I have program like below, function Foo is called by threds and main process. Now how to identify funtion Foo is called by thread or main process.
#include
#include
DWORD WINAPI Foo(LPVOID lPtr);
int main()
{
DWORD…

Naren
- 31
- 1
- 5
0
votes
0 answers
How to properly include header files with msvc in vscode?
I did vcpkg install mman.h && vcpkg integrate install.
Now default C\CPP Linter in VSCode sees that header file, but compiler doesnt.
My tasks.json file :
{
"tasks": [
{
"type": "shell",
"label": "cl.exe build…

Ragnar Lothbrok
- 1
- 1
- 4
0
votes
1 answer
Why would function templates not be analyzed by MSVC12's auto-vectorizer?
Function templates are not seen by the auto-vectorization or the auto-parallelizer (/Qpar) engine in VS2013.
For example, this code:
void foo::someFunc(int a)
{
int myArray[1000000];
for (unsigned i = 0; i < 1000000; i++)
{
…

James
- 270
- 1
- 10
0
votes
0 answers
Conversion operator won't compile in Visual Studio 2013, but compiles successfully with gcc
The following code compiles successfully with gcc but fails to compile in Visual Studio 2013:
#include
#include
using namespace std;
template
class MyClass {
public:
MyClass(T* ptr) : m_ptr(ptr) {}
// All…

tjwrona1992
- 8,614
- 8
- 35
- 98
0
votes
1 answer
Qt application prompts msvcp120.dll missing on a computer even though build from MSVC2017
I have a Qt application (Win x64 download here http://api.straw-solutions.cz/?action=downloadSoftware&productKey=lumen&platform=win_x86_64 ). When I tried to publish it, I got an echo that when starting the aplication, it prompts that MSVCR120.dll…

Danol
- 368
- 1
- 15
0
votes
0 answers
Cmake configuration error when configuring opencv_contrib in Windows10
My IDE is Visual Studio 2013, when I cofigured opencv_contribute, CMake_GUI ouptut:
found IPP (ICV version): 9.0.1 [9.0.1]
at: E:/opencv/OpenCV3/opencv/3rdparty/ippicv/unpack/ippicv_win
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
To…

Finley
- 795
- 1
- 8
- 26
0
votes
1 answer
method existence checker code breaks in vs2015
The following code checks if foo() method exists in class A. This code is compiling under vs2013, but static assertion fails on vs2015. Which compiler version tells the truth? If vs2015, then how to fix the code?
#include
struct…

simon
- 1,210
- 12
- 26
0
votes
0 answers
MSB8031 error thrown with Visual Studio 2013 solution generated by CMake using ExternalData
When I add a test target with CMake's ExternalData, i.e.
include(ExternalData)
set(ExternalData_URL_TEMPLATES "http://ntctestdata/SoftwareTestData/AutomatedTests/%(algo)/%(hash)")
ExternalData_Add_Test(it_SdfFullData
NAME it_SdfFull
COMMAND…

Matt
- 1,928
- 24
- 44
0
votes
1 answer
ITK itkImageFileReader.h causing linking errors
I have built ITK 4.10 with CMAKE and Visual Studio 2013 but I work with it on QtCreator. I have followed this link to write the .pro file. It works great except for one point. When I include itkImageFileReader.h, I get 11 LNK2019 errors (others .h…

John
- 1
- 2