Using legacy toolset from VS2005 in VS2019 - c++

I ran into the rare situation that I have to use static libraries in a project which were compiled with Visual Studio 2005.
As I do not want to get into trouble at runtime as mentioned in this post or here,
I think it's reasonable to use the original toolset.
As far as I have seen, using toolsets down to VS2008 is straightforward. For VS2005 this seems to be more challenging, only Daffodil might be an option.
Is there any chance to get the toolset v80 (VS2005) into the dropdown menu of VS2019 ?
After playing around, I don't know exactly understand how daffodil works or how a feasible approach looks like.
Maybe one could create wrapper-DLLs with a plain C-API and the help of VS2005. Using one IDE with various toolsets feels advantageously to me.

Daffodil works only in earlier versions of Visual Studio 2012/2013/2015.
For using daffodils, check out the related thread: How to move old VC6 project to VS2010 using Daffodil.
To build your project in VS 2010:
Make sure the VC 6 build tools are installed and working. Make sure VS
2010 and Daffodil are installed and working. Open your VS 6 workspace
in VS 2010. A. In Explorer, right-click on your VS 6 workspace (*.dsw)
file. B. Choose Open With -> Microsoft Visual Studio 2010. C. Perform
the migration when prompted. Change the Platform Toolset to v60. A.
Right click on the project(s) and select Properties. B. On the General
page, set Platform Toolset to v60. Build.

Related

Using Visual Studio 2017/2019 to run VS 2008 C++ project

I wonder if anybody has experience converting VS 2008 C++ solution to VS 2017/19 without switching to newer SDK and toolset. The solution is quite old, very large, uses 3-rd party libraries, so full conversion is out of the question. The goal is only to switch to better user interface.
Theoretically it is probably possible, although I successfully converted only very basic C++ MFC project.
Project settings in VS 2017 show only latest toolset. To make other toolsets to appear, I had to install VS 2010, and also add SDK 8.1 from VS installer (without VS 2010, this option is not available). Then select toolset v.90 and SDK 8.1 for each project in solution.
At this point, simple converted project works fine. A large legacy solution has a lots of issues. I resolved generic ones, but it looks like uphill battle. For example, C++ directories are physically different and some of the files are missing. It may be possible to eventually assign original VS 2008 directories to each project and/or copy missing files, but I have the impression of doing something illegal.
The question is, is it a valid procedure and still possible after latest updates.
Thanks==

Visual Studio doesn't recognize Unreal Engine

I'm a student in Videogame Development, and just starting out looking at Unreal.
And no, none of my teachers know anything about this.
I have installed Unreal Engine 4.13 and Visual Studio Community 2013 now 2015.
I'm trying to make a C++ project using Unreal Engine (using blueprints is out of question so this didn't help)
Now, when I make a basic C++ project, Visual Studio shows the following error message:
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- UE4, "C:\Users\Gebruiker\MEGA\Unreal\Disposable\Intermediate\ProjectFiles\UE4.vcxproj"
- Disposable, "C:\Users\Gebruiker\MEGA\Unreal\Disposable\Intermediate\ProjectFiles\Disposable.vcxproj"
No changes required
These projects can be opened in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
- Engine, "Engine"
- Games, "Games"
- Disposable, "C:\Users\Gebruiker\MEGA\Unreal\Disposable\Disposable.sln"
Then my browser opens showing a Migration Report telling me that VS had an error with Project.vcxproj and UE4.vcxproj, although it copes with Engine, Games and Project.sln.
After this VS does show up without any further action, and it does automatically open *.h and *.cpp files for newly added classes in UE4.
Though it does edit and save these, it claims that all UE's code is wrong (with squiggles), and for compiling UE4 gives errors on pieces of code that apparently don't give errors on other's machines.
It would be much appreciated to be helped out, and I'm sure it would help others too who would have the same problem.
EDIT
A screenshot of the problem and configuration
EDIT 2
A screenshot of the Help -> About Visual Studio page, VS 2015 C++ highlighted
Starting with both the Unreal Engine Editor and Visual Studio closed, right click your .uproject file and select Generate Visual Studio project files, and then launch visual studio from the .sln file.
Once Visual Studio is open check your Solution Configuration is set to Development Editor. Then go to Debug > Start without Debugging (or Ctrl-F5). If everything compiles and the Editor opens again then you're good to go.
I uninstalled VS2013, installed VS2015 with all additional options checked, made a blank, new project with Unreal with just VS2015 on my pc, and now everything works fine.
Perhaps my VS2013 installation was broken, deprecated or switching version wasn't a good idea, but I can work with VS in any case now.
Also thanks to jeevcat for mentioning it!
Install newer version of the Visual Studio. VS2013 is not the latest one, VS2015 is. People report that even updating VS2013 from Update 2 to Update 4 helps resolving similar issues.

How to move old VC6 project to VS2010 using Daffodil

I've been interested in this project lately.
I have an old legacy project made in VC6, which I hear is a great IDE but doesn't run smoothly on my machine. I also don't know how to work with it. A full blown move to a 2010/12 project is a big time spent so I wonder:
Can someone share some basic information on how to use this tool? I've been searching a lot and couldn't find anything more comprehensive than the site.
Which specific old VC6 tools do I need to make sure to have working for Daffodil? (compiler, linker, etc) where are they located on the installed machine?
To build your project in VS 2010:
Make sure the VC 6 build tools are installed and working.
Make sure VS 2010 and Daffodil are installed and working.
Open your VS 6 workspace in VS 2010.
A. In Explorer, right-click on your VS 6 workspace (*.dsw) file.
B. Choose Open With -> Microsoft Visual Studio 2010.
C. Perform the migration when prompted.
Change the Platform Toolset to v60.
A. Right click on the project(s) and select Properties.
B. On the General page, set Platform Toolset to v60.
Build.
A quick read tells me that the concept of "Daffodil" is to use the VC6 compiler with the VS2010 IDE. Therefore, you wouldn't run VS6 on your machine. You just need the VC6 compiler and linker.
Start by letting Vs2012 migrate the project and see what doesn't work properly. The newer compilers are much better -once you've gone through the pain of the conversion.

Visual Studio 11 Ultimate Static Analysis Shows No Output

So Microsoft released a trial version of Visual Studio 11 Ultimate Developer Preview. I decided to try out the static code analysis feature.
I successfully updated my solution to 2011 and get my project file to build.
However when I try to run the 'Run Code Analysis For Solution' it then proceeds to simply build the solution/project but display no output in the code analysis window (even if I've hacked the code to make sure it should show some errors).
I did have Visual Studio 2010 previously installed and I wonder if that's affecting it?
Any help or anyone ran into similar issue?
*EDIT:
I made a sample project and in it the code analysis works... I'm not sure what I'm missing from my old migrated project to enable it. (I've done the obvious and enabled Static Analysis in the configuration properties menu)
First check which build toolset do you use.
For upgraded project it is Visual Studio 2010 by default.
However when I did similar exercise with my project it didn't compile after switching to VC11 compiler - there were some issues with include paths I had to resolve.

Visual Studio 2008 Express MFC Support

As may be known by many, the Express versions of Visual Studio 2008 don't include support for MFC and a few other packages required to compile a lot of windows programs.
So, here's my problem:
I have the full version of Visual Studio 2005. I've been using this to compile a project that a friend of mine was working on, so that I could test it out for him and continue to track bugs and things. Recently, he upgraded that project to VS 2008, which I don't have. So, I downloaded the express version in the hopes that I could simply compile with that, but no luck, it complains about headers missing left and right.
It seems to me that since I already have the full version of VS 2005, I'm bound to have at least some (perhaps older) version of the files in question that his project needs to compile against.
Is there a way I can convince VS 2008 to also look in 2005's directories for include files and library files to compile against?
Furthermore, is this a bad idea? I would really prefer not to go out and purchase VS 2008 full, as I'll never use it myself. (2005 does the job fine for me at the moment, and I tend to prefer GCC anyway.)
Thanks
You can use the VC++ compiler directly from the command line, or just create a new project w/ the source in Visual Studio 2005. Unless he is using some functionality provided in the new versions of MFC/ATL in 2008/2008sp1, you should be able to compile the project just fine.
See ("Create Project from Existing Source") in Visual Studio 2005. It is unfortunate that they don't include these libraries with the Express Editions.
Use the vcvars*.bat script(s) from Visual Studio 2005. See this blogpost from VC++ Blog to see how. You will use the old compilers, but the build system from Visual Studio 2008.
You can go into Tools>Options>Projects and Solutions>VC++ Directories
and alter the Include, Library, and Source (and Reference maybe?) folders to use VC++ 2005's folders.
I'd guess you just replace $(VCInstallDir) with a hardcoded VS 2005 path. I'd record the original values before doing this.
However, have you just tried using the OLD 2005 sln and vcproj files? Keep using 2005 on your end and 2008 on his. Keep two sets of these files for each IDE. Any issues are going to be with the library mismatch - which you're not avoiding by using 2008's tools with 2005's libraries.
The simple way to deal with this would be to revert the solution and project files back to their visual studio 2005 state from source control(you are using source control right?). At this point you can compile the project as long as your friend does not use any of the mfc 9 only functions.
The first thing I would try is loading this up in VS 2005 by just modifying the version of the .sln and the .vcproj files. In the .vcproj change the version from 9.00 to 8.00 and in the .sln change the format version from 10.00 to 9.00.
If you don't have fancy stuff in the project you have a high chance of just being able to use it like this. Also this would avoid having to update 2 project and solution files.
On this website it is shown how MFC code can be compiled with the Visual Studio Express versions:
link
Just for the record, I've done that(by modifying the include directories and library directories from inside the IDE) and it's working pretty well, I have MFC, ATL, everything.
I've found this explanation. http://www.codeproject.com/Articles/30439/How-to-compile-MFC-code-in-Visual-C-Express