Is it possible to use the VC++ 6 compiler in Visual Studio 2012? - 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

Related

Is it possible to add the Visual C++ v120 Compiler Tool Set to Visual Studio 2015?

I have a programm using an GSL library which worked quite well with Visual Studio 2013. Now I set up a new Windows version and installed Visual Studio 2015 RC Community.
After that I can not compile the code anymore. After converting the code to the new tool set I got the error that some external symbols of the libraries could not be found. I think this has something to do with the fact, that the library was build with Visual C++ v120.
So is there a possiblilty to add this Compiler Version to the Studio? And does it work without trouble next to a new version installed. I do not want to install the older version of VS, because of the possibility of some troubles haveing to version parallel installed.
You can install VS2013 toolset version from your VS2015 installer without installing visual studio 2013. From the 2015 installer, select Windows 8.1 and Windows Phone 8.0/8.1 Tools. Thats it.
Found it in a msdn forum (have to be the first time something is actually solved in a microsoft forum)
Install Visual Studio 2013
Open your Project in Visual Studio 2015
In the General page of the Project Properties, change the Platform Toolset to "Visual Studio 2013 (v120)"
You never have to open Visual Studio 2013; you just have to install it so that Visual Studio 2015 can find the toolset. (Unfortunately there is no way to install just the toolset.)

Visual studio - gtkmm-app - MSVCP100D.dll is missing

I cannot execute my gtkmm-app any longer in visual studio 2012. It compiles fine but when executing it crasches. I get the error message that MSVCP100D.dll is missing.
I made this app in visualstudio 2010 last spring. OS was windows XP. No problem whatsoever.
Now I have visualstudio 2012 and windows 8.1 and get this error-message.
I dont know what to do? Is there a way to install MSVCP100.dll in the system-folder or could something be done in VS 2012?
I may underline that I just encountetred this problem when compiling and executing my gtkmm-app for the first time since the platform change and IDE-update. Ordinary console-applications no problems whatsoever.
If you also have time/knowledge - what is the purpose of this dll-file?
You are getting this error probably because you changed your compiler.
What you can do is to either recompile gtkmm with current Visual Studio or download pre-compiled binaries and rebuild your application.
Option 2 is to install Visual Studio 2010 back and forget about Visual Studio 2012.
If you want both latest Visual Studio and gtkmm 3 then...
It's not an easy task, and it's hard to answer your question in detail here, so
Here is an tutorial to let you get started compiling/installing gtkmm 3 in Visual Studio 2013 for Windows 7 and later:

WDK 8.1 fails with Visual Studio 2012

I am trying to build a project using WDK 8.1 and Visual Studio 2012 under Windows 8. I do not have Visual Studio 2013 Preview installed, however according to the requirements page I have fulfilled all the requirements:
WDK 8.1 Requirements
That page says:
System Requirements Before you install the WDK, you must first install
Microsoft Visual Studio Professional 2012 or above.
My project was created using WDK 8.0 so I followed the instructions provided here for migrating to WDK 8.1:
ProjectUpgradeTool: Upgrade a WDK 8 project or solution to WDK 8.1
While running the command:
ProjectUpgradeTool.exe C:\Sources\MyDriver
I got the following error:
Catastrophic failure while converting projects under
'C:\Sources\MyDriver': Message:Could not load file or assembly
'Microsoft.Build, Version=12.0.0.0 , Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependenc ies. The
system cannot find the file specified.
StackTrace=
at Microsoft.DriverKit.ProjectUpgradeTool.ProjectUpgrader.UpgradeProjec
ts(IEnumerable1 projectFiles)
at Microsoft.DriverKit.ProjectUpgradeTool.Upgrader.UpgradeProjects(IEnu
merable1 files, String newOsConfigName)
Does anyone have a hint on how to get around this error?
Update as of Jan 12 2014
The documentation has been modified since I posted this question, and it clearly states now that VS2013 is indeed required for WDK8.1 development.
Same question in MSDN forums
If you want to use WDK with Visual Studio 2012, you should get not 8.1 version but 8.0 of WDK.
The first item in the system requirements on the page that you have linked to clearly states that Visual Studio 2013 is required to use WDK 8.1:
Before you install WDK 8.1, you must first install Visual Studio 2013.
You will need to keep using WDK 8 with Visual Studio 2012, although it's not officially supported any more:
We provide Windows Driver Kit (WDK) 8 to give you time to migrate to
WDK 8.1 and Visual Studio 2013. Microsoft does not support WDK 8 and
will make no further updates to WDK 8. We recommend that you use the
latest versions of the WDK and Visual Studio to build drivers for
Windows. Download the Windows Driver Kit (WDK) 8, which has tools to
build, test, debug, and deploy drivers.
You need Visual Studio 2013 to develop for Windows 8.1 I believe.
If you have both WDK 8.0 and 8.1 installed, the active one is specified using %WDKContentRoot% env var. Your vcxproj likely references the WDK by this variable so may have to change it.

Corrupt C runtime library?

I'm using Visual Studio Professional 2012 (with Update 2) and since I have a project that needs to be built with the VC++ 2010 toolset I also installed Visual C++ 2010 Express (with SP1).
I use the newer 2012 IDE also for the older projects. So for these projects I set the Platform Toolset to v100. And when I also set the runtime library to /MT or /MTd I get the following error:
error LNK1127: library is corrupt
for libcpmt.lib or libcpmtd.lib, depending on the configuration.
What could be wrong here?
Installation history:
VS2012 Professional
Windows 7 SDK
Uninstalled VS2012 and Windows SDK
VC++ 2010 Express
VS2012 Professional
If I understood correctly, you installed VS2010 after installing VS2012? If not, please edit your question to make it clear.
This sequence of installations is not recommended by Microsoft, and there are plenty of caveats and ReadMe's to navigate in order to find out what's happened.
I suggest that the best thing to do is to reinstall VS2012 (or do a repair install), then see what - if anything - is still broken.

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