Autocompletion in MSVC - visual-c++

In my project, autocompletion just comes and goes as it pleases.
I'm using MSVC 2017 Community on Windows 8.1.
Is there a way to have it on consistently?

Related

Can I use Visual Studio for developing Linux C or C++?

I have to develop something in Linux(CentOS 6.5) Environment using C or C++ language with many of libraries for linux.
As you know, CentOS is not GUI. So, I want to use Microsoft Visual Studio for my work. It's OK even if use just VS as the Editor.
I mean that I like the features of IDE visual studio(intellisense, debugger, and so on).
I have Visual Studio 2008, 2010, 2013 Professional.
yes you can, in fact, if you have setup a VM machine, you can even directly include the C++ include library of Linux (However, this only works for write code, not work with compiling). You could also setup CYGWIN or MINGW for referencing the header of Linux platform.
In fact, for myself, I switched to QtCreator as a cross platform C++ IDE, it also has auto-complete and debug features.

MSVC 2010 and MSVC 2012 are not works together

I have come accross following situation:
I had MSVC 2012 express and pro edition in my windows 8 machine. My application build and run was working fine. Now I have installed MSVC 2010 express edition. My application build works. However it crashes duing run.
I had MSVC 2010 express and pro edition in my windows 7 machine. My application build and run was working fine. Now I have installed MSVC 2012 express edition. My application build works. However it crashes duing run.
I am using qt 5.0.2 64 and 32 bit creator to build and run my application.
My question is whether MSVC 2010 and MSVC 2012 are not works together in a single machine?
Will they replace older version exe/dlls or will they conflict each other?
Is there any solution/fix without removing MSVC 2010 and MSVC 2012?
The order of installation is important - you can use VS2010 and VS2012 together (I do) but you must install VS2010 first.
Simply reinstall VS2012 and you should be ok, although you may need to use the Windows SDK registration utility after installing VS2012 to make sure that VS2010 is directed to the Windows 7 SDK.

Cannot use WinDbg and SOS in Visual Studio Immediate window

I'm following this tutorial: link. At step 8, when I say .load sos in the Immediate Window, it just pukes expected expression.
System: Win 7 x64, Visual Studio 2012 Premium.
I have an installed Debugging Tools for Windows (x64) 11/14/2012, Now I installed X64 Debuggers And Tools. I have Windows SDK for Windows 7 (7.1). WinDbg.exe is in c:\Program Files\Debugging Tools for Windows (x64)\ and I can start it from start menu. However I cannot find sos.dll, which supposed to come with the Debugging Tools for Windows (x64).
How can I make this happen?
Bonus question: {,,kernel32}_LoadLibraryExW#12 in Step 4 doesn't work, I use {,,kernel32}LoadLibraryExW, but then I cannot figure out where is the loaded dll name. I was poking around with the registers.
NTSD command support (MSDN) and Immediate Window Commands describe which WinDbg commands (or similar to WinDbg) are supported by Visual Studio 2005, 2008 and 2010. It's only a small subset:
.S
.X
.K
.U
.~
.Reload
.Sympath
.Cxr
.Exr
.Load
.Unload
.Unloadall
Most important is probably the .Load which allows loading extensions and then using ! commands of the extension.
It seems that support for WinDbg commands was dropped with VS 2012, since you cannot call the web page for VS versions higher than VS 2010.

Is it possible to use the VC++ 6 compiler in Visual Studio 2012?

I am using Visual Studio 2012 to develop my projects, and I also have installed Visual Studio 2010 - which gives me the option to use the VC++10 compiler in Visual Studio 2012 (project properties), but I also have installed Visual C++ 6 and somehow the option to use the VC++6 compiler is not present in Visual Studio 2012, how do I add this option (manually)?
The answer is definitely maybe. It seems quite possible, but I could not get a copy of VC 6 so I was unable to verify it. What I was able to do was to get VS 2012 to use VC 7 (VS 2002) to compile a project.
Update: The answer is definitely yes. The OP indicates in the comments that he was able to get VC 6 working by using this solution.
Configuration
The way I did this was to install the following (in order of install):
Windows 7, SP1, 32 Bit
I chose Windows 7 because it is the earliest version of Windows that will support VS 2012. I used a 32 Bit version because VS 2002 (VC7) would not install on an x64 machine.
Visual Studio 2002, SP1
As I mentioned, I could not get VC6. It was no where to be found on Microsoft's site. Bruce's comment under this question provides this helpful insight:
Visual C++ 6.0 isn't available (including via MSDN) from Microsoft because it included the Microsoft JVM. See this link for details. – BruceCran
After seeing the above, I figured that installing VS 2002 (VC 7) was the next best thing.
Obviously, this is where you would install VC 6, if you have a copy1.
1I should note, for anyone that is interested, that VC 6 is available on Ebay. If I were being paid in actual currency instead of points I would have gone the extra mile and gotten a copy of VC 6 to test.
Visual Studio 2010, SP1
The only reason for this is that it is a requirement for Daffodil. More on Daffodil below.
Visual Studio 2012, Update 2
This is a requirement from the original question.
Daffodil
This is a set of configuration files that allows VS 2010 and VS 2012 to target older VC compilers.
Currently, these are the supported VC compiler versions:
VC 8 (Visual Studio 2005)
VC 7.1 (Visual Studio 2003)
VC 7 (Visual Studio 2002)
VC 6 (Visual Studio 6)
I should note that Daffodil does not officially support VS 2012 as an IDE, but it does seem to work. From the Daffodil site:
Daffodil works fine in VS 2012 and later versions2 as long as VS 2010 is also installed.
2 There appears to be a debugging problem when using VS 2013 and VS 2015, as noted here:
Debugging information does not match, when using v60 platform toolset inside Visual Studio 2013
Testing
To test the above I created a new C++ Win 32 console project in Visual Studio 2012. I then removed all header and cpp files from the project - these have things that are VS 2012 specific, so were not needed. I then added a simple "hello world" file that I could use to test:
#include <iostream.h>
void main()
{
cout << "Hello World!" << endl;
}
Using the project as is (targeting VS 2012), I tried to build it and it failed.
Next, I right-clicked the project and selected properties. I selected Configuration Properties on the left side of the dialog, and then under Platform Toolset, on the right, I selected v70. You will note that there is also an option for v60:
I then saved the change to the project and did a build. It built an exe successfully. Just to verify that VC 7 was being used, I launched Process Monitor during the compile:
As you can see cl.exe, the compiler, is being called from the VC 7 directory.
Final Thoughts
The original question involves compiling an existing VC 6 project. Just a couple of notes on this.
My guess is that for retargeting to work, that you will have to create a new empty project in VS 2012, and then add in all of the existing source files. The reason for doing this is that obviously the project format is different between the two versions of Visual Studio.
As I mentioned, I tested using VC 7 instead of 6. I suppose the last step is for the OP to try all of this using VC 6. Hopefully it all works.
Links
Daffodil at CodePlex
C++ Native Multi-Targeting for VS 2010 at the C++ Team Blog
VS Android - Configuration for targeting Android using VS 2010
VS-Tool - Configurations for targeting various frameworks: Clang, EmScripten, MinGW, NACL, Python

Why last additions to VC++11 are not allowed in XP target'

I want to compile next line:
R"(The String Data \ Stuff " )"
When target is windows XP (vc110_xp), it gives me compilation error; if the VC++ target is not Windows XP, compiler accepts the syntax.
¿Why?
The November 2012 Compiler CTP is a community technology preview: it's a preview for people to use and test with, but is not intended for production use (it does not come with a "Go Live" license).
Visual Studio 2012 Update 1 is an update for Visual Studio 2012 that is intended for production use. This is the update that includes support for using Visual C++ 2012 to target Windows XP.
These are two different releases, made for two different purposes. The November 2012 Compiler CTP was released before Visual Studio 2012 Update 1 was released, and it does not include the support for Windows XP (it only updates the compiler binaries, though, so you might be able to use some MSBuild magic to use the new preview compiler with the new Windows XP support libraries; doing so is not supported, though).

Resources