Compiling in VS 2013 Using compiler tools v90 error - c++

I ran into a problem which everytime i try to compile just a test project with windows 2013 using v90 compiler tools, i get this error:
1>------ Build started: Project: Test Console App, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.targets(62,5): error : Required file "" is missing.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
It works fine if i compile it using VS 2008, but I feel more confortable with visual studio 2013 or 2012, Intellisence is much better, as well as the colors, etc...
I installed the windows 7.1 SDK, as well as the update pack with the 2010 Compiler tools. I have both VS 2008 and VS 2013, as well as all the C++ Redists.
I can't compile the projects I'm working on, since we have libs compiled with 2008 to which we don't have the sources to, giving us linker errors.
Thanks

The answer was to have visual studio 2010 installed. Express worked nicely.
Just for other people with the same problem, here is what you do:
Install VS 2013/2012 depending on which one you want.
Install VS 2008 and 2010 ( can be express ).
If that doesnt pick up your compiler tools v90/v100 then just follow these instructions:
-Uninstall all C++ 2010 Redists if any, or SDK 7.1 won't install.
-Install Windows SDK 7.1 and then download the Windows C++ Compiler Tools 2010 update for the SDK.
-Install the C++ Redists again.
-Reboot.
-Enjoy! :P

Related

Changing target to x64 breaks the FLTK build in Visual Studio 2017

I'm trying to build the FLTK version 1.3.4 which you can find from http://www.fltk.org/software.php in Visual Studio 2017.
I unzip everything, navigate to the ide/VisualC2010/ folder, and open the fltk.sln file in Visual Studio 2017.
Visual Studio asks if I would like to upgrade project targets to the latest Microsoft Visual Studio 2017 toolset. The upgrade options are Windows SDK Version: 10.0.16299.0 and Platform Toolset: Upgrade to v141. I press OK.
At this point if I do Build->Build Solution (Ctrl Shift B), everything works. However I noticed that the target is Win32 and I would like to also compile the library so I can link against x64 programs.
I go to Build->Configuration Manager and then in the Active Solution Platform->New... and Type or select new platform: x64 and Copy settings from: Win32 and Create new project platforms [checked] and then I press OK. This takes a while to complete.
Repeating step 3 no longer succeeds, with many projects failing with fatal error c1041: cannot open program database ...
I am pretty much a beginner at Visual Studio and I don't really understand what I'm doing. Can someone clue me in on what is happening here?
Fixed it by going to Tools -> Options and then Build and Run and then I changed maximum number of parallel project builds from 4 to 1.

Cant compile for x64 even after installing Visual C++ 2008 Express and Windows SDK

I have Visual C++ 2008 Express Edition installed. From here I have installed the MICROSOFT WINDOWS SOFTWARE DEVELOPMENT KIT FOR WINDOWS 7 and .NET FRAMEWORK 4 for x64 bit compile.
Now I can see the option of x64 through IDE in configuration menu. But whenever I try to build with this Debug|x64 selected, all I get is:
========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped ==========
It never gets build and always fails.
I also don’t have amd64\vcvarsamd64.bat folder inside C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
Even when trying to build from cmd through msbuild "[PROJECT_PATH].sln" /t:Clean,Build /p:Configuration=Debug;Platform=x64 I get this:
Microsoft (R) Build Engine Version 3.5.30729.5420
[Microsoft .NET Framework, Version 2.0.50727.5420]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
Build started 11/4/2016 11:55:00 AM.
Project "[PROJECT_PATH].sln" on node 0 (Clean;Build target(s)).
Building solution configuration "Debug|x64".
vcbuild.exe : error VCBLD0004: Project '[PROJECT_PATH].vcproj' does not contain a configuration called 'Debug|x64'.
vcbuild.exe : error VCBLD0004: Project '[PROJECT_PATH].vcproj' does not contain a configuration called 'Debug|x64'.
vcbuild.exe : error VCBLD0004: Project '[PROJECT_PATH].vcproj' does not contain a configuration called 'Debug|x64'.
Done Building Project "[PROJECT_PATH].sln" (Clean;Build target(s)) -- FAILED.
Build FAILED.
Seems like tools aren’t installed but I have installed Windows SDK after selecting the compile tools, then why it isn’t?
Any idea what went wrong?
The Windows SDK does not include any C++ compiler, and VC++ 2008 Express edition is 32 bit only. You need to install a 64 bit compiler (more recent versions of VC++ Express are available in 64 bit flavor).

MSBuild configuration error WDK 8.1 Visual Studio 2015 to build kernel mode driver

I'm struggling with VS 2015 C++ 'Platform Toolset' configuration property to build a test *.sys kernel driver I want play around this night.
So, this is a fresh new installation of VS 2015 Pro (update 1) plus WDK 8.1 (just downloaded) running on clean Win 8.1
All libs and headers like ntddk.h are in place.
But C++ Solution Explorer -> General -> Platform Toolset does not eat every option:
Visual Studio 2015 (v140) -- ok
Visual Studio 2015 - Windows XP (v140_xp) -- ok
WindowsApplicationForDrivers8.1 -- error
WindowsKernelModeDriver8.1 -- error (need this one)
WindowsUserModeDriver8.1 -- error
Nags as follows:
One or more values are invalid. MSBuild returned the following error:
The imported project "C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\v120\Microsoft.cpp.props" was not
found. (Directory exists though!) Confirm that the path in the
declaration is correct, and that the file exists on disk.
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Redirect.12.props
I don't know what it could be. Am I supposed to have WDK 10 towards to VS2015?!
Anyway, I need the ability to build the driver on VS 2015.
Could it be directed compiler scripts?
Any ideas?
Ok
Moving to WDK 10 helped!
https://msdn.microsoft.com/en-us/windows-drivers/develop/building_a_driver
Ensure that you have the same version of SDK and WDK installed on your
computer.
You need to install the driver update for visual studio if you are working on visual studio then you have to get the proper update for it. I've a link please follow this link and you will get rid off from this problem..enter link description here
enter link description here

Visual Studio 2013: CL.exe exited with code -1073741515

I have a fresh Windows 8.1 Pro x64 install with a fresh Visual Studio 2013 Pro.
When trying to compile a project with Platform Toolset to Windows7.1SDK I'm getting
Error 1 error MSB6006: "CL.exe" exited with code -1073741515. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.targets 57 5 MenuBrowser
I tried running the supplied "Windows SDK Configuration Tool" and besides getting an error about Visual Studio 2005 and 2008 not being installed I think it did its job.
I tried manually editing the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows
where I manually put CurrentInstallFolder as C:\Program Files\Microsoft SDKs\Windows\v7.1\ and CurrentVersion as 7.1.7600.0.30514. If I look at the project properties and click the different paths / variables in there -> more -> Macros, I can see that $(WindowsSdkDir) is correct.
Any idea as to what I should try? Never ran into this problem on the old development computer with Windows 7 and VS 2012.
L.E. as a note, if I try a new project with the v120 tools, it works, but I need the Windows7.1SDK tools.
When trying to compile a project with Platform Toolset to Windows7.1SDK...
That's not a valid selection in a "fresh" install for VS2013. Not very clear what you've been doing, it certainly isn't "fresh" anymore. Do treat Regedit.exe as a loaded weapon, the registry key set that configures VS has been getting pretty doggone convoluted as of late.
The compiler crashes with -1073741515 == 0xC0000135 == STATUS_DLL_NOT_FOUND. That's a pretty serious mishap of course, it should never occur when you target SDK 7.1 since that still uses the same compiler, only the SDK directory is changed. The compiler itself, as well as the DLLs it uses, are not part of the SDK and only are provided if the machine doesn't have VS installed. You can use SysInternals' Process Monitor to diagnose this, you'll see the CL.EXE process searching for a DLL and not finding it.
The correct way to target 7.1 is to use the v120_xp toolset selection. That builds programs that can still run on XP, it automatically also selects the 7.1A SDK that was installed on your machine. Do try to undo the changes you've made.
Referencing Yodans solution from
How to build with v90 platform toolset in VS2012 without VS2008, using Windows SDK?:
As pointed out by Hans Passant cl.exe looks for mspdb100.dll (among others) and does not find them.
The needed files are in the directory mentioned in 7. below:
My working setup:
VS2013 needs to use VS2010 libs
Using WinSDK 7.1 build tools (v100) in VS2013
clean install, uninstalling everything mentioned in the sdk release notes (can be downloaded at http://www.microsoft.com/en-us/download/details.aspx?id=8279 under category Details)
Microsoft Windows SDK for Windows 7 (7.1) (the Windows SDK core-component files)
Application Verifier
Debugging Tools for Windows
Windows Performance Toolkit
Microsoft Help Viewer 1.0
Microsoft Visual C++ 2010 Redistributable
Microsoft Visual C++ 2010 Standard Edition
Additionally removed all .NET and VC++ related MS Software (not tested if necessary)
choosing Windows7.1SDK as Platform Toolset in VS2013
error MSB6006: "CL.exe" exited with code -1073741515
cl.exe looks for one of msobj100.dll, mspdb100.dll, mspdbcore.dll and mspdbsrv.exe
Added to PATH: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Build works and binary is usable!
A mistake I did:
copied files in 6. above to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin, believing this directory is in PATH, but it was not!
So better do as sugested in 7. above or by Yodan in How to build with v90 platform toolset in VS2012 without VS2008, using Windows SDK?
The following steps work for me in VS 2017.
1.Close VS 2017.
2.Restart machine.
3.Open solution in VS 2017.
4.Build the project.
This time I didn't get following error and it builds successfully.
error msb6006 "link.exe" exited with code -1073741819.

MSVCP120d.dll missing

Every time I want to compile my Visual Studio project I get the message that MSVCP120d.dll is missing. Google can't help me. I already installed some redistributables but they didn't help. I also found this:
Msvcp120d.dll Debug version of C++ runtime. No redistribution
allowed.
http://msdn.microsoft.com/en-us/library/windows/hardware/dn448963(v=vs.85).aspx
From the comments, the problem was caused by using dlls that were built with Visual Studio 2013 in a project compiled with Visual Studio 2012. The reason for this was a third party library named the folders containing the dlls vc11, vc12. One has to be careful with any system that uses the compiler version (less than 4 digits) since this does not match the version of Visual Studio (except for Visual Studio 2010).
vc8 = Visual Studio 2005
vc9 = Visual Studio 2008
vc10 = Visual Studio 2010
vc11 = Visual Studio 2012
vc12 = Visual Studio 2013
vc14 = Visual Studio 2015
vc15 = Visual Studio 2017
vc16 = Visual Studio 2019
The Microsoft C++ runtime dlls use a 2 or 3 digit code also based on the compiler version not the version of Visual Studio.
MSVCP80.DLL is from Visual Studio 2005
MSVCP90.DLL is from Visual Studio 2008
MSVCP100.DLL is from Visual Studio 2010
MSVCP110.DLL is from Visual Studio 2012
MSVCP120.DLL is from Visual Studio 2013
MSVCP140.DLL is from Visual Studio 2015, 2017 and 2019
There is binary compatibility between Visual Studio 2015, 2017 and 2019.
I have found myself wasting time searching for a solution on this, and i suspect doing it again in future. So here's a note to myself and others who might find this useful.
If MSVCP120.DLL is missing, that means you have not installed Visual C++ Redistributable Packages for Visual Studio 2013 (x86 and x64). Install that, restart and you should find this file in c:\Windows\System32 .
Now if MSVCP120D.DLL is missing, this means that the application you are trying to run is built in Debug mode. As OP has mentioned, the debug version of the runtime is NOT distributable.
So what do we do?
Well, there is one option that I know of: Go to your Project's Debug configuration > C/C++ > Code Generation > Runtime Library and select Multi-threaded Debug (/MTd). This will statically link MSVCP120D.dll into your executable.
There is also a quick-fix if you just want to get something up quickly: Copy the MSVCP120D.DLL from sys32 (mine is C:\Windows\System32) folder. You may also need MSVCR120D.DLL.
Addendum to the quick fix: To reduce guesswork, you can use dependency walker. Open your application with dependency walker, and you'll see what dll files are needed.
For example, my recent application was built in Visual Studio 2015 (Windows 10 64-bit machine) and I am targeting it to a 32-bit Windows XP machine. Using dependency walker, my application (see screenshot) needs the following files:
opencv_*.dll <-- my own dll files (might also have dependency)
msvcp140d.dll <-- SysWOW64\msvcp140d.dll
kernel32.dll <-- SysWOW64\kernel32.dll
vcruntime140d.dll <-- SysWOW64\vcruntime140d.dll
ucrtbased.dll <-- SysWOW64\ucrtbased.dll
Aside from the opencv* files that I have built, I would also need to copy the system files from C:\Windows\SysWow64 (System32 for 32-bit).
You're welcome. :-)
I have the same problem with you when I implement OpenCV 2.4.11 on VS 2015.
I tried to solve this problem by three methods one by one but they didn't work:
download MSVCP120.DLL online and add it to windows path and OpenCV bin file path
install Visual C++ Redistributable Packages for Visual Studio 2013 both x86 and x86
adjust Debug mode. Go to configuration > C/C++ > Code Generation > Runtime Library and select Multi-threaded Debug (/MTd)
Finally I solved this problem by reinstalling VS2015 with selecting all the options that can be installed, it takes a lot space but it really works.
I downloaded msvcr120d.dll and msvcp120d.dll for 32-bit version and then, I put them into Debug folder of my project. It worked well. (My computer is 64-bit version)
My problem was with x64 compilations deployed to a remote testing machine. I found the x64 versions of msvp120d.dll and msvcr120d.dll in
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\Debug_NonRedist\x64\Microsoft.VC120.DebugCRT
I had the same problem in Visual Studio Pro 2017: missing MSVCP120.dll file in Release mode and missing MSVCP120d.dll file in Debug mode.
I installed Visual C++ Redistributable Packages for Visual Studio 2013 and Update for Visual C++ 2013 and Visual C++ Redistributable Package as suggested here Microsoft answer this fixed the release mode.
For the debug mode what eventually worked was to copy msvcp120d.dll and msvcr120d.dll from a different computer (with Visual studio 2013) into C:\Windows\System32
Alternate approach : without installation of Redistributable package.
Check out in some github for the relevant dll, some people upload the reference dll for their application dependency.
you can download and use them in your project , I have used and run them successfully.
example : https://github.com/Emotiv/community-sdk/find/master
I was building my application on VS 2019 when this issue came up. You can copy these DLLs from this location into debug directory of your application to get going.