Error linking to x86.obj - c++

Using Visual Studio 2017 RC, I get this compile error:
LINK : fatal error LNK1181: cannot open input file 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.24728\lib\x86.obj'
x86.obj does not exist on my system. Yet, the compiler wants to link to it, although I have not instructed so in the project properties. Does it misinterpret a folder name ($(VC_LibraryPath_x86)) as an object to which it has to link? Could it be a bug?
On the other hand, I found out that a similar problem also occurs in Visual Studio 2015, there is even an (unanswered) question on it: LNK1104 cannot open file '...lib.obj'
Does anyone have an idea what is going wrong here? Thanks.
--
Diagnostic build output:
LINK : fatal error LNK1104: cannot open file 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.24728\lib\x86.obj'
The command exited with code 1104.
Output Property: LinkSkippedExecution=False
Done executing task "Link" -- FAILED.

Related

How to fix 'cxxabi.h' file not found error?

I'm using Microsoft Visual Studio 2022 version and I'm getting this error when trying to compile my project which depends on this cmdline open source project.
cmdline.h(39,10): fatal error : 'cxxabi.h' file not found
How to fix this error?

Error with build in Visual Studio (C++) (files/directories are missing?)

after installing the community version of Visual Studio 2019 I was able to open projects and to write code but if I want to start the program following error appears: "Error while creating, do you want to continue and open the last build?"...if I select yes:
"The program"C:\Users\user\source\repos\Project2\Debug\Project2.exe" can not be started. The system couldnt find the file".
I tried to reintall Viusal Studio multiple times but the error still occurs.
This also shows up if I try to run the "HelloWorld" program from Visual Studio so I assume the code isnt responible for the error.
Following appears too:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\yvals.h(12,10): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "crtdbg.h": No such file or directory
All together there are 412 files missing ore undefined.

how to resolve error PRJ0002 : Error result -1073741515 returned from 'cl.exe'?

I have tried to see my functions using dump.exe and link.exe through visual studio command line.
After that IDE not working fine. I got the following error
error PRJ0002 : Error result -1073741515 returned from 'C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe'
How to resolve this error.
Thank you.
-1073741515 == 0xFFFF FFFF C000 0135 == STATUS_DLL_NOT_FOUND
Which basically means, that cl.exe is unable to start, because it can not load some dynamic link library. It seems, that you managed to corrupt your Visual Studio installation and reinstall/repair is in order.

link.exe returns error LNK1181: cannot open input file 'C:\Program.obj'

I'm compiling with a Batch file containing
#echo off
set link=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link
"%link%" external_input.obj periodic_dinger.obj flagger.obj monitor.obj main.obj libGui.lib libCore.lib libCint.lib libRIO.lib libNet.lib libHist.lib libGraf.lib libGraf3D.lib libGpad.lib libTree.lib libRint.lib libPostscript.lib libMatrix.lib libPhysics.lib libMathCore.lib libThread.lib
All the objects and libraries are in the same directory, which is the directory I'm executing the Batch file from, and also where the Batch file is located. I've tried adding the current directory to /LIBPATH:, but no luck. My LIB environment variable is
C:\Users\jroth\Data\online_monitor_v.0.5>echo %LIB%
"C:\Program Files\ (x86)\Microsoft Visual Studio 11.0\VC\LIB";"C:\Program Files
(x86)\Microsoft Visual Studio 11.0\VC\ATLMFC\LIB";"C:\Program Files (x86)\Window
s Kits\8.0\lib\win8\um\x86";
I made sure that everything was quoted. The same error came up when everything was unquoted. The error verbatim is
C:\Users\jroth\Data\online_monitor_v.0.5>make
Microsoft (R) Incremental Linker Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link
LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj'
make.bat is the name of the batch file I'm using to link this, not a makefile.
I'm running vcvarsall.bat before doing any of this.
The problem was with the environment variable link that you used. The MS linker also uses this variable for flags.
From https://msdn.microsoft.com/en-us/library/6y6t9esh.aspx:
The LINK tool uses the following environment variables:
LINK, if defined. The LINK tool processes options and arguments defined in the LINK environment variable before processing the command line.
So you can't use set link=..., you'll have to use another name. _link will do fine.

Errors when running the program in Visual Studio 2013

I have these problems coming up, when trying to run the program in Visual Studio 2013 C++. I know the code is ok, but every time, this happens.
Error 1 error : The source file for this compilation can be found at:
"C:\Users\Łukasz\AppData\Local\Temp\4fac5eed-ed73-4dda-8bdc-c333e2e82b4c.txt" C:\Program
Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\CodeAnalysis\Microsoft.CodeAnalysis.targets
Error 2
error MSB3758: An error has occurred during compilation. error CS0016:
Could not write to output file
'c:\Users\Łukasz\AppData\Local\Temp\dtlusbnh.dll' -- 'Access is
denied. ' C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\CodeAnalysis\Microsoft.CodeAnalysis.targets
Error 3
error MSB4036: The "SetEnvironmentVariable" task was not found. Check
the following: 1.) The name of the task in the project file is the
same as the name of the task class. 2.) The task class is "public" and
implements the Microsoft.Build.Framework.ITask interface. 3.) The task
is correctly declared with in the project file, or in the
*.tasks files located in the "C:\Program Files (x86)\MSBuild\12.0\bin" directory. C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\CodeAnalysis\Microsoft.CodeAnalysis.targets
The
” Could not write to output file
error message means that the file is in use.
Since it's a DLL, it's in use by some program or programs.
You need to terminate those processes.
Error 3
error MSB4036: The "SetEnvironmentVariable" task was not found. Check
the following: 1.) The name of the task in the project file is the
same as the name of the task class. 2.) The task class is "public" and
implements the Microsoft.Build.Framework.ITask interface. 3.) The task
is correctly declared with in the project file, or in the *.tasks
files located in the "C:\Program Files (x86)\MSBuild\12.0\bin"
directory. C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\CodeAnalysis\Microsoft.CodeAnalysis.targets
I had only the one error above, after repairing visual studio it resolved the problem.
I faced the same problem.
Run Visual Studio as Administrator solved my problem.
I encountered this issues for Visual Studio 2019 and running visual studio as administrator resolved the issue