Error in visual studio 2012 (They were build errer) - visual-studio-2010

I'm new at Visual studio 2010
When I hit "start debugging(F5)" obviously it says: "would you like to build it?"
then I push yes button and it is says:"There were build error. Would you like to continue and run the last successful build?"
then I hit yes button and it says: "Unable to start program c:\users\My computer\documents\visual studio 2010\projects\tutorial1\Debug\tutorial.exe"
here is the Output:
1>------ Build started: Project: tutorial1, Configuration: Debug Win32 ------
1>InitializeBuildStatus:
1> Touching "Debug\tutorial1.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.13
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I don't know how to solve this problem. Can anyone help me?

To Answer:
then I hit yes button and it says: "Unable to start program
c:\users\My computer\documents\visual studio
2010\projects\tutorial1\Debug\tutorial.exe"
This is the case where Visual Studio would try to launch the output of the previous build.
Visual Studio would try to launch the output of the StartUp project from the current Configuration (Debug/Release) output folder.
In your case "c:\users\My computer\documents\visual studio 2010\projects\tutorial1\Debug\tutorial.exe" that was built during the last build operation would have been deleted.
The deletion could have happened as part of Clean operation.
Note: Rebuild would run Clean and Build.
Based on the error posted:
Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview

Related

fatal error LNK1104: cannot open file 'libboost_regex-vc142-mt-gd-x32-1_74.lib'

I am using Microsoft Visual Studio Professional 2019 Version 16.9.5 and trying to compile code as mentioned in Boost.StringAlgorithms.
I am getting the below error during local compilation and linking :
1>------ Build started: Project: Boost.StringAlgorithms, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc142-mt-gd-x32-1_74.lib'
1>Done building project "Boost.StringAlgorithms.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have ensured that I have set the project properties (link and libs). I do see the concerned file in C:\tools\boost_1_74_0\stage\lib directory:
libboost_regex-vc142-mt-gd-x64-1_74.lib
boost_regex-vc142-mt-gd-x64-1_74.lib
I have build all boost library for x64 architecture - why the linking process is looking for libboost_regex-vc142-mt-gd-x32-1_74.lib ?

USBView Compile Error

I just downloaded the USBView sample application, and I'm getting a cryptic error when compiling with Visual Studio 2010.
1>------ Rebuild All started: Project: usbview, Configuration: Win8 Debug Win32 ------
1>Build started 10/5/2012 11:58:11 AM.
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(518,5):
error MSB8008: Specified platform toolset
(WindowsApplicationForDrivers8.0) is not installed or invalid. Please
make sure that a supported PlatformToolset value is selected.
1>
1>Build FAILED.
1> 1>Time Elapsed 00:00:00.16
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Any thoughts or ideas to resolve this would be appreciated. I'm using Windows 7, 32-bit.
I was able to resolve the problem by installing Visual Studio 2012 Express and recommended components, removing the offending line from the Microsoft.Cpp.Platform.targets file (double-clicked error message), and compiling as Release.

Compiling CUDA exampels with Visual Studio 2010 express

I am trying to set up a CUDA dev env on a Windows 7 32bit computer with Visual Studio 2010 Express.
But I keep getting the following error when I try to compile the bandwithTest project that follow with the CUDA SDK!
1>------ Build started: Project: cutil, Configuration: Release Win32 ------
2>------ Build started: Project: shrUtils, Configuration: Release Win32 ------
2>LINK : fatal error LNK1104: cannot open file 'lib\Win32\shrUtils32.lib'
1>LINK : fatal error LNK1104: cannot open file 'lib\Win32\\cutil32.dll'
3>------ Build started: Project: bandwidthTest, Configuration: Release Win32 ------
3>LINK : fatal error LNK1104: cannot open file '../../bin/win32/Release//bandwidthTest.exe'
========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
Follow this guide: How to Run CUDA In Visual Studio 2010
Check my answer to this question:
cuda sdk example bandwidthTest - build failed
If they are already built then check if they are correctly listed in the additional library directories in the solution properties, linking tab.

MSB building error

Could you please let me know what can be the reason for the following error:
Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code -1073741515.
I am building my C project in the microsoft visual studio 2010.
thanks
[EDIT]
Following is the total error msg
>Build started 7/5/2011 9:33:32 AM.
1>InitializeBuildStatus:
1> Touching "Debug\final_version.unsuccessfulbuild".
1>CustomBuild:
1> Performing Custom Build Tools
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code -1073741515.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.07
I am not using QT and others but I am using custome build to make the parser compatible for the windows. Those parsers were coded for unix flatform.I am using bison and flex for
getting the grammer useful for windows. After getting those grammar, I am trying to build the project with custome building the lex and yacc files.
This is because your custom build EXE is failing to start. In my case, the EXE was finding an old version of a DLL that was incompatible. I was getting the exact same error message, "code -1073741515" and all. I updated the DLL next to the EXE and the problem was solved.

Visual Studio 2010 new project wizard manufactured MFC Dialog program doesn't compile in Debug Mode?

I've created a new project using the Visual Studio 2010's wizard. Once VS was finished generating the project I tried building it - in release mode it worked great, but in debug mode it didn't, giving the following compiler error:
1>------ Build started: Project: MyProj, Configuration: Debug Win32 ------
1>Build started 05/10/2010 22:17:08.
1>InitializeBuildStatus:
1> Touching "Debug\MyProj.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> All outputs are up-to-date.
1>ResourceCompile:
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>LINK : fatal error LNK1104: cannot open file 'D:\My Documents\Dev\MyProj\MyProj\Debug\MyProj.exe'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.24
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I set the following parameters in the wizard:
MFC Application
Dialog based
Use MFC in a static library
Added the "Windows Sockets" advanced feature
I'm on a Windows 7 64bit Ultimate machine.
This seems like a minor bug in Visual Studio 2010. Once I closed the solution and reopened it, it worked fine...
This error is reproducible on my setup.

Resources