Questions tagged [msvc12]

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.

139 questions
3
votes
2 answers

Visual Studio 2013 VC++ Compiler

I am working Visual Studio 2013 and boost 1.60. When I try to build a project, an error occurred, as seen below: boost\type_traits\common_type.hpp(42): fatal error C1001: An internal error has occurred in the compiler. After googling around, it…
bozhao
  • 51
  • 1
  • 4
3
votes
1 answer

Can't compile any Qt projects in Windows commandline, only in Qt Creator

I'm starting to mess with Qt, and I've had no issues compiling projects within their IDE. Commandline has been a different story. Qt Creator is cool and all, but I need to automate my builds. It doesn't get much more simple than this: untitled.pro…
kayleeFrye_onDeck
  • 6,648
  • 5
  • 69
  • 80
3
votes
1 answer

How to modify the PATH variable in Qt Creator's project file (.pro)

I use Qt Creator 3.4.2 for Windows and MSVC2013 compiler. When I build the project I get an error: LNK1158: cannot run 'rc.exe' I managed to fix it by adding "C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Bin" to the PATH variable…
lvds
  • 127
  • 2
  • 7
3
votes
2 answers

MSVC 2013 Bug? Retrieving last element from mapped container

Say I have a std::map and I want to write some code that will return to me the element at the back of the mapped vector, given some key. So I first write some code that will return to me the element at the end of a…
AndyG
  • 39,700
  • 8
  • 109
  • 143
3
votes
2 answers

qualified names in C++ class declaration

According to this page, the class name can be "optionally qualified". Thus, I expect the following code to compile: struct ::globalSt {}; In MSVC 2013u4, I get an error: Error 1 error C2039: 'globalSt' : is not a member of '`global…
Hector
  • 2,464
  • 3
  • 19
  • 34
3
votes
1 answer

qt-creator and msvc can't add a (static) library

I have a 3rd party (closed source) static library (.lib) written in C, with a C++ compatible header and a very simple C++ test program. After creating a new project in Qt-creator, I tried to compile the program and link to the static library, but…
AkiRoss
  • 11,745
  • 6
  • 59
  • 86
2
votes
0 answers

vcvarsall.bat unusable in PowerShell

I want to use x64 Native Tools Command Prompt in PowerShell. I run "vcvarsall.bat amd64" in it but it didn't enter the Developer Command env.situation
Rizen
  • 21
  • 2
2
votes
1 answer

Why is the "returning reference to temporary object" compiler warning not triggered?

Consider this simple code: struct Container { struct Item {}; Item operator[](size_t /*index*/) const { return Item(); } const Item& f() const { return operator[](0); } }; int main() { Container c; …
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
2
votes
1 answer

VS2013 : compiler bug with float and /EHa + /fp:strict?

We just moved from VS2010 to VS2013 and I found a strange bug and I wonder it might be due to the compiler. Compiled with the command line cl ConsoleApplication1.cpp /EHa /fp:strict /O2 the following program gives : 0xC0000005: Access violation…
BenjaminB
  • 1,809
  • 3
  • 18
  • 32
2
votes
1 answer

Compiling gcc code in Visual Studio causes error C3646: '__attribute__': unknown override specifier

I am getting the following error: error C3646: '__attribute__': unknown override specifier Code: LEMUR_PREALIGN char _stack[ sizeof(_Type) * _Count ] LEMUR_POSTALIGN; Complete error: 1>c:\program files\indri\indri…
Asim Saeed
  • 63
  • 1
  • 4
2
votes
2 answers

double-colon (::) before method declaration in class definition

I have a class written by a 3rd party, which has something like this Foo.h: class Foo { public: int Foo::dosomething(float x, float y, float z); //Other things here }; And in Foo.cpp, dosomething is: int Foo::dosomething(float x, float y,…
7VoltCrayon
  • 662
  • 1
  • 7
  • 22
2
votes
1 answer

Compiling Boost MPL samples on MSVC 2013

Well, I successfully built the test programme: #include #include #include #include int main() { using namespace boost::lambda; typedef std::istream_iterator in; …
Adrian
  • 10,246
  • 4
  • 44
  • 110
2
votes
4 answers

Issues with C++ command-line arguments on Windows

I'm somehow having issues parsing command-line arguments on Windows in C++. I tried using this int main(int argc, char **argv) { std::cout << "Command-line argument count: " << argc << " \n"; std::cout << "Arguments:\n"; for (int i = 0;…
codefox
  • 31
  • 4
2
votes
2 answers

What value to expect from a macro that has been set to the result of defined()?

In the very simple C program below, what is the expected compiler error? gcc is giving me 1 whereas MSVC 2013 is giving me 2. #define foo #define bar (defined(foo)) #if bar #error 1 #else #error 2 #endif My questions are hopefully equally…
o.c.
  • 271
  • 1
  • 3
  • 12
2
votes
1 answer

Display tailored information in Qt Creator debugger "locals and expressions"

Win 7, Qt Creator, Qt 5.3, If I want to display the content of my own classes in the Qt debugger, how can I do it? Rather than displaying the technical details only, I want to provide a synopsis. So like for QStringList, or std:string in the…
Horst Walter
  • 13,663
  • 32
  • 126
  • 228
1 2
3
9 10