bootstrap boost with Visual Studio 2013 hangs - visual-studio

I want to build Boost 1_54_0 under Windows 7 using Visual Studio 2013. I opened a VS 2013 command prompt, cd'd into the boost_1_54_0 directory, and said bootstrap. I saw a message "Building Boost.Build engine", and then no indication of progress for hours. I couldn't find any way to abort the process, so I rebooted. Then I opened bootstrap.log, and the last thing in there is this:
C:\Code\boost_1_54_0_full\boost_1_54_0\tools\build\v2\engine>.\bootstrap\jam0 -f build.jam --toolset=vc10 "--toolset-root=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools....\VC\ " clean
That "Visual Studio 10.0" means it's actually trying to compile using the Visual Studio 2010 tools rather than 2013, right?
What am I doing wrong?
EDIT: for the record, I had 2 problems. One was the problem with Boost that was fixed by using the version from svn. The other was that VS 2013 provides 3 command prompt shortcuts:
Developer Command Prompt for VS2013
VS2013 x64 Cross Tools Command Prompt
VS2013 x86 Native Tools Command Prompt
Since I was trying to build 32-bit libraries, something with "x64" in the name seemed like the least logical choice to try, but it turned out to be the only one that worked.

First of all, Boost 1.54 and even 1.55 is not compatible with VS 2013 because VS was released after these Boost releases. You can take a compatible version at the Boost SVN.
See also the discussion here: How do I build boost with new Visual Studio 2013 preview?

Related

Should I install Visual Studio 2017 beside Visual Studio 2015 or should I first uninstall Visual Studio 2015 and then install Visual Studio 2017?

I am currently using Visual Studio 2015 for programming ASP.NET Core applications. I have the following questions regarding installing Visual Studio 2017:
What is considered to be best practice and/or cleanest method?
Should I install Visual Studio 2017 beside Visual Studio 2015?
Should I first uninstall Visual Studio 2015 and all .NET Core dependencies and then install Visual Studio 2017?
Are there any tools that would ensure a clean uninstall of Visual Studio 2015?
From page Visual Studio 2017 Platform Targeting and Compatibility
Compatibility with Previous Releases Installation
You can install and use Visual Studio 2017 alongside previous versions of Visual Studio, including Visual Studio 2015, Visual Studio 2013, and Visua Studio 2012.
So yes. you can install them without any problem.
VS 2013, VS 2015, and VS 2017 all work well side-by-side. VS 2012 can be a little dodgy on Windows 10, but should also work side-by-side. In theory VS 2010 should also work side-by-side with those, but I've run into quirks in the past with them interfering with one-another.
Projects should round-trip between 2015 and 2017 generally, although there are some one-way upgrade scenarios.
Note that if you really just need the older compiler toolset for some reason, you can also install VS 2017 and select the optional component Microsoft.VisualStudio.Component.VC.140 which installs the older v140 compiler which you can still use with the VS 2017 IDE. That said, there's not a lot of reason to do this since the VS 2015 & VS 2017 C++ standard libraries are binary compatible so you can mix them in a project.
See this blog post for information on VS 2017.
It sounds like you have done some projects in 2015 already, so you will probably want to keep it.
Once you open a project in a new version, it will try to upgrade the project and then you can't go back.
However, if you have multiple versions installed at the same time, when you try to open a project, say, from Windows Explorer, it will open it with the "Visual Studio Version Checker" and will look at the project file and determine which version to open it in.
Bottom line, if you have the hard drive space, there is no reason to not install them alongside each other.
In the past, it was recommended to install them in sequential order if you are installing multiple versions, but it doesn't sound like this is an issue for you and I don't know if that is even a problem anymore as it has been several versions since I have had to deal with that.
Good luck!
Personally, I would keep both - there have been multiple times through the years where you have compatibility issues and NEED to have the prior version(s). I've also had old project that will not upgrade and I've gone back and reinstalled old VS versions.
If you have no reason to keep VS2015 in your computer I would suggest uninstalling it.
I uninstalled VS2015 after installing VS2017 and later noticing that I was still using an old taskbar shortcut to VS2015.
So I was inadvertently still using VS2015.
Maybe some special cases require keeping older versions of VS along side the new version, but for the rest of us, I say, uninstall!
VS 2015 is the last version that is supported by Installshield LE.
If you have a need for building installers in the future, it will be useful to have VS 2015
1,2,3. Visual Studio 2017 has more features over 2015 and it contains 2015's current features so you don't need 2015 alongside 2017. Just stick with 2017. And I don't think you will have any problems while opening 2013 and 2015 projects with Visual Studio 2017.
Uninstall Tool is a good tool to use. It cleanses all the leftover files and registry entries after running the original uninstallation wizard and even tells you how many files will be cleaned after the required reboot.
For people continuing to read this, I have Visual Studio Professional 2008 (For Windows Embedded 6.5), 2010, 2015, 2017 and they all work even if open at the same time.
Edit: As stated in other answers, they need to be installed from oldest version to newest.

Debugging information does not match, when using v60 platform toolset inside Visual Studio 2013

I am using Visual Studio 2013, but I'm in need to develop an old project using the Visual C++ 6.0 compiler.
For this purpose, I have been using Daffodil with no problem on Windows 8.1 for a while.
(You can read more how to use the VC++ 6 compiler in newer Visual Studio versions in this StackOverflow question: Is it possible to use the VC++ 6 compiler in Visual Studio 2012?)
Now I got a new Windows 10 machine, where I reinstalled Visual Studio 6, 2010, 2013 and Daffodil.
Using v60 build tools (Visual C++ 6.0 compiler), project gets compiled fine.
However, when I try to debug, VS says that "debugging information does not match", and I am unable to set breakpoints etc., but:
PDB file is there, same folder and name of debug executable;
Application built in Debug mode, with debug information enabled;
Debugger works fine when using Visual Studio 2010 or 2013 build tools;
Debugger works fine if opening the project inside Visual C++ 6 IDE.
I tried reinstalling all Visual Studio versions as well as Daffodil, but didn't solve.
Any clue what could the problem be?
Finally I actually found a working solution!
for VS 2013:
Enable "Native Edit and Continue"
under Tools->Options->Debugging->Edit and Continue
for VS 2015:
Enable "Use Native Compatibility Mode"
under Tools->Options->Debugging->General

Not able to build POCO lib on VS13

I am getting build errors while compiling POCO first time with VS13. I think it is not compatible with VS13. Any idea, how to fix this without downgrading my Visual Studio?
C:\Users\as\Documents\Visual Studio 2013\Projects\poco-1.4.6p4> buildwin.cmd 110
error MSB8020: The build tools for Visual Studio
2012 (Platform Toolset = 'v110') cannot be found. To build using the v110 build tools, please install Visual Studio 2012 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade
Solution...". [C:\Users\asjaiswal\Documents\Visual Studio 2013\Projects\poco-1.4.6p4\Net\samples\WebSocketServer\WebSocketServer_vs110.vcxproj]
Thanks.
Version 110 is Visual Studio 2012. VS 2013 is version 120 and those projects are not available in the releases yet.
VS 2013 support has been introduced in develop branch, which also has (in addition to the old batch files) the PowerShell build script (see announcement) which automatically detects available VS version if present.
EDIT: VS2013 projects are available now.

Visual Studio 2012 "Invalid license data. Reinstall is required"

I have a newly built Windows 8 VM with VS 2012 Premium running on it, when I try open any sln file I get the following modal pop up error
Visual Studio 2010 Shell
Invalid license data. Reinstall is required.
I can open the sln's if I open up VS and then do project open, this is really annoying, any ideas how I fix it?
*Note I have done a VS repair and it didn't solve it...and I never had any VS RC release on the machine, all new build with s/w downloaded from the MSDN
Cheers
I encountered the same exact error when I created a solution with a full version of Visual Studio 2012 Professional on one machine and then tried to open the solution file with a copy of Visual Studio 2012 Express on a different machine. I got the error when double-clicking the solution file, but not when loading the solution into an already opened instance.
I fixed the error by opening the solution file (.sln) with notepad and changing the line that says Visual Studio 2012 to say Visual Studio Express 2012 for Windows Desktop.
After that, I was able to double-click to open the solution file on the machine that has Express installed.
I'm using VS 2013. I fixed this by right clicking the .sln and setting the Open With parameter to visual studio 2013 and not VS version selector or VS 2010.
I have faced the same problem. When I set the system Date and Time to the current Date and Time, The Problem solved by itself.
It looks like the .sln extension is owned by "Visual Studio 2010 Shell" a minimal version of Visual Studio that ships with products like SQL Server and Office to provide support for add-in development without any other features. Since this is a minimal version, it's unable to load any project type that ships with Visual Studio Express, Professional or above.
The same may happen when you have Visual Studio Express installed next to a full version of Visual Studio.
This may happen when you install an older version of Office or SQL Server after having installed Visual Studio. The old installer will hijack the extension.
To repair this problem:
use the "Open With" option of Windows and select the "Visual Studio Version Selector" as your default action.
Or open the "Default Programs" option in Windows, look up the .sln extension and make sure it uses the "Visual Studio Version Selector" as default:
Or locate Visual Studio 2012 in the Programs and Features window of Windows and chose "Change", the Visual Studio installer will pop up, chose "Repair" to have it repair the file associations and any other problems that may arise by installing Visual Studio versions in reverse order (it may for example mess up the MsBuild directory as well).
Remember that when Visual Studio 2010 was released, it could not yet know what Visual Studio 2012 would change, as such, it's best to install versions of Visual Studio in the order they were released. This may sometimes prove difficult, as other products may install Visual Studio versions without you knowing.

Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview

I've installed Visual Studio 2012 Release Preview, and it appears to be fine, but now when I try to use Visual Studio 2010 to compile C++ projects, I get the following error message:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
I'm not 100% sure of this, but it seems to be related to projects that have .rc (resource) files in them.
I've tried repairing Visual Studio 2010 from Add/Remove programs and rebooting, but this has no effect.
I also get the same error if I use Visual Studio 2012 RC to compile the C++ projects when set to use the Visual Studio 2010 toolset. Upgrading to the Visual Studio 2011 toolset fixes the problem (but of course I don't want to do this for production code).
Update: I've uninstalled Visual Studio 2012, rebooted, and the problem still persists! Help!
This MSDN thread explains how to fix it.
To summarize:
Either disable incremental linking, by going to
Project Properties
-> Configuration Properties
-> Linker (General)
-> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
or install VS2010 SP1.
Edits (#CraigRinger): Note that installing VS 2010 SP1 will remove the 64-bit compilers. You need to install the VS 2010 SP1 compiler pack to get them back.
This affects Microsoft Windows SDK 7.1 for Windows 7 and .NET 4.0 as well as Visual Studio 2010.
If disabling incremental linking doesn't work for you, and turning off "Embed Manifest" doesn't work either, then search your path for multiple versions of CVTRES.exe.
By debugging with the /VERBOSE linker option I found the linker was writing that error message when it tried to invoke cvtres and it failed.
It turned out that I had two versions of this utility in my path. One at C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cvtres.exe and one at C:\Windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe. After VS2012 install, the VS2010 version of cvtres.exe will no longer work. If that's the first one in your path, and the linker decides it needs to convert a .res file to COFF object format, the link will fail with LNK1123.
(Really annoying that the error message has nothing to do with the actual problem, but that's not unusual for a Microsoft product.)
Just delete/rename the older version of the utility, or re-arrange your PATH variable, so that the version that works comes first.
Be aware that for x64 tooling builds you may also have to check C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 where there is another cvtres.exe.
Check the version of cvtrs.exe:
dir "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe"
Wrong version:
date: 03/18/2010
time: 01:16 PM
size: 31,048 bytes
name: cvtres.exe
Correct version:
date: 02/21/2011
time: 06:03 PM
size: 31,056 bytes
name: cvtres.exe
If you have wrong version you should copy the correct version from:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
and replace the one here:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
i.e.
copy "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe"
According to this thread in MSDN forums: VS2012 RC installation breaks VS2010 C++ projects, simply, take cvtres.exe from VS2010 SP1
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
or from VS2012
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
and copy it over the cvtres.exe in VS2010 RTM installation (the one without SP1)
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
This way, you will effectively use the corrected version of cvtres.exe which is 11.0.51106.1.
Repeat the same steps for 64-bit version of the tool in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cvtres.exe.
This solution is an alternative to installation of SP1 for VS2010 - in some cases you simply can't install SP1 (i.e. if you need to support pre-SP1 builds).
If you have installed Visual Studio 2012 RC, then it installed .NET 4.5 RC.
Uninstall .NET 4.5 RC, and install the version you need (4.0 for VS 2010). This should clear up any problems you are having.
This solved the same problem. There is no need to uninstall Visual Studio.
It's because of .NET Framework 4.5 is replacing .NET Framework 4.0.
I uninstalled Visual Studio 2010 several times with no luck. When I removed .NET Framework 4.5 and reinstalled Visual Studio 2010 it went fine.
See Uninstall Visual Studio 11 completely to do a fresh install.
For me, setting 'Generate Manifest' to 'No' fixed it. (Also fixed with /INCREMENTAL:NO)
If you're using x64, here's a resource will help:
This happens because Microsoft .NET 4.5 is incompatible with Visual C++ 10. The workaround is to ensure that you run the .NET version of cvtres.exe rather than the Visual C++ version. I did this by renaming the Visual C++ versions of those files and copying the .NET versions in their place.
1. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
2. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cvtres.exe
1. C:\windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe
2. C:\windows\Microsoft.NET\Framework64\v4.0.30319\cvtres.exe
I solved this problem eventually by doing a full uninstall of VS2012 RC, followed by a full uninstall of VS2010, then a reinstall from scratch of VS2010.
It took forever, but I'm now able to compile C++ projects in VS2010 again.
The issue was magically resolved for me by removing .NET 4.5, and replacing it with .NET 4.0. I then had to repair Visual Studio 2010 - it being corrupted along the way somehow.
I had previously installed, and then un-installed, Visual Studio 2012 - which may be related to the issue.
I have not installed Visual Studio 2012, but I still got this error in Visual Studio 2010. I got this resolved after installing Visual Studio 2010 SP1.
I had the same problem with Microsoft Visual Studio 2010 Ultimate and it was solved by the method described in this youtube video
The video suggests to rename the file cvtres.exe in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin (in my Win7X64 matchine) to cvtres-old.exe
It didn't work for me after Enable Incremental Linking -> "No (/INCREMENTAL:NO)", but it works for me after I deleted the rc file.
+1 to user Short for an answer that worked for me!
I tried to do some debugging of this with msbuild /v:diag, and I'm seeing that MSBuild is trying to embed a manifest in the executable, with <somename>.dll.embed.manifest.res on the linker command line, where that is a resource file built from <somename>.dll.embed.manifest. But the manifest file is an empty Unicode text file. (That is, a two-byte file with the Unicode 0xFEFF prefix)
So the root problem seems to have something to do with that manifest file not being generated, or it being used when <somename>.dll.intermediate.manifest should have been used.
An alternate solution seems to be to turn off the "Embed Manifest" option under Properties, Manifest Tool, Input and Output.
To summarize:
Step1
Project Properties
-> Configuration Properties
-> Linker (General)
-> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
if step1 not work, do Step2
Project Properties
-> Configuration Properties
-> Manifest Tool (Input and Output)
-> Enable Incremental Linking -> "No"
if step2 not work, do Step3
Copy file one of:
C:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\bin\cvtres.exe
C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\bin\cvtres.exe
C:\Program Files (x86)\Microsoft Visual Studio
13.0\VC\bin\cvtres.exe
Then, replace to C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\bin\cvtres.exe
With me, do 3 step it work
As of January 2014, for some reasons I got installed .NET Framework 4.5.1, I don't know if due to a third party software installation or to an automatic update.
On January 29th, I got installed one component and I started receiving the
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
message. At that time, I solved by avoiding the incremental link.
On Jan. 31st, I got installed another component of .NET Framework 4.5.1 and the incremental link trick did not work anymore. I then installed the Visual Studio 2010 SP1, but afterwards the problem became:
Error 6 error LNK1104: cannot open file 'msvcrtd.lib'.
I think the SP1 messed up my Visual Studio 2010 installation.
So I uninstalled .NET Framework 4.5.1, installed .NET Framework 4.0 and uninstalled and then reinstalled Visual Studio 2010. That worked for me.
Even inspite of installing Service pack you are getting the error then try removing/renaming the cvtres.exe in the C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin folder. This has worked for me.
I set Enable Incremental Linking to "No (/INCREMENTAL:NO)" and it doesn't work for me.
Next I've changed:
Project Properties
-> Configuration Properties
-> General
-> Platform Toolset -> "Visual Studio 2012 (v110)"
and it works for me :)
Reinstalling CMake worked for me. The new copy of CMake figured out that it should use Visual Studio 11 instead of 10.
I was using the Windows SDK for core Win32 programming and had .NET 4.5 installed for "unknown" reasons. I have uninstalled that and installed 4.0 like previous answers and yeah, it worked for me too.
Just am flabbergasted that I had to use the useless .NET framework for building Win32 apps using the SDK.
I solved this by doing the following:
In a command prompt, type msconfig and press enter.
Click services tab.
Look for "Application Experience" and put tick mark (that is, select this to enable).
Click OK. And restart if necessary.
Thus the problem will go forever. Do build randomly and debug your C++ projects without any disturbance.
For those of you looking for a solution for this problem with the OpenGL SuperBible 6th source code samples, the solution is building in Release instead of Debug. All projects have disabled the incremental linking option in the Release version.
My problem was that I've had two paths on my PC that contained the same libraries. Both paths were added to the Additional Library Directories in Configuration Properties -> Linker -> General. Removing one of the paths solved the problem.
I had the same problem after updating of .NET:
I uninstalled the .NET framework first,
downloaded visual studio from visualstudio.com and selected "repair".
NET framework were installed automatically with visual studio -> and now it works fine!
I tried a few times and finally solved the problem by uninstalling several times the VS2010. I think I hadn't uninstalled all the files and that's why it didn't work for the first time.
In the installation of VS2012, it is said that if you have VS2010 SP1 you can't work on the same project in both programs. It is recommended to have only one program.
Thanks!

Resources