I am trying to compile on cmd using cl and it says that I'm missing mspdb110.dll.
Anyone know how to fix this?
Edit: I added this file path to PATH C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin and the file is a standard hello world program
If you are trying to execute cl.exe from the command line, you need several environment variables added/modified. See here for further details:
Command line compile using cl.exe?
The version mentioned in that post is VS2010, for VS2012, you should be running 'Developer Command Prompt for VS2012', which will set the variables for you.
Related
I am getting below error, while building C++ solution on VS2019 via command prompt.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.ToolsetLocation.props(50,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160Platforms\Win32\Platform.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160Platforms\Win32\Platform.props" is correct, and that the file exists on disk.
After observing it is very clear that there is an issue with the path created internally at some props file. It is not very clear why and from where this is coming up.
Any pointers would be of great help.
Thanks in advance.
MSBuild - MSB4019 Due to invalid path (Visual Studio 2019)
There is some errors when you install VS2019.
To fix it, please try this:
1) Open VS Installer, and make sure that you have installed v142 Build Tool.
Or run this on an elevated command prompt (admin): npm install --global --production windows-build-tools. If you don't have npm, I recommend installing it, otherwise this won't work.
2) I found that v160Platforms does not have \, is that the same as you description?
Please create a new environment variables called VCTargetsPath and put its value to this:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\
3) do a fix in vs installer or just update your VS if it is not thee latest version.
Then use developer command prompt for VS2019 as administrator to run your command.
In addition, you can use -verbosity:detailed in command line to see the detailed build log to check whether there is a obvious error. More info you can check this similar issue.
This was not due to the installation issues. This was caused due to VCTargetsPath passed to the MSBuild.exe. In VS2017, it was expecting the VCTargetsPath to be passed in the build command whereas it failed with construction of invalid path if we pass the value in VS2019. Hence after removing the VCTargetsPath from the command all worked well for me.
I ran into the exactly same problem today. The system env path of VCTargetsPath misses a slash at the end.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\ **<--- end slash**
I am trying to link Qt5.0.2 to Visual Studio 2012 so I can do some GUI programming in C++ inside the Visual Studio environment. I have Downloaded and install ActivePerl and added Perl to the PATH environment variable and Create Perl file extension. I than downloaded Qt and installed it. I opened my Visual Studio Command prompt and changed to my C:Qt\Qt5.0.2 directory. Inside this directory I have a 5.0.2 folder, Tools folder, License folder, MaintenanceTool files and so on. Once inside of my C:Qt\Qt5.0.2 directory, I inserted this command: configure -debug-and-release -opensource -shared -platform win32-msvc2012. I get an error saying 'configure' is not recognized as a an internal or external command, operational program or batch file.
I have no idea what this means and what to do. I have been following my instructions from this aticle http://briolidz.wordpress.com/2012/03/07/compiling-qt-with-visual-studio-2010/
Can anyone help me with this?
Thanks
If I was you, I would follow instructions posted here http://qt-project.org/wiki/Building_Qt_5_from_Git
I have a link script that links a bunch of obj and lib files into a dll. I'm trying to do the same thing in Visual Studio, but without any luck. Problem is that the project doesn't have any source files. The project needs to take all the lib and obj files and link them to a dll.
I'm not sure you can do it from Visual Studio, but you can do it from the Visual Studio Command Prompt with a command like this:
link /OUT:"Dll.dll" /DLL obj1.obj obj2.obj lib1.lib lib2.lib
Create Makefile project. In VC++ 2010: Visual C++ - General - Makefile Project. In the Project properties open Build command line: Configuration properties - NMake - Build command line. Enter the script name here. When you execute Build command, this script is executed.
I compiled my c++ program in the directory
D:\Program Files\Microsoft Visual Studio 9.0\VC\bin
But stdlib.h is present in the path.
D:\Program Files\Microsoft Visual Studio 9.0\VC\include
While compiling my program, it throws the following error in the command prompt.
fatal error c1083:cannot open include file:"stdlib.h":No such file or directory
NMAKE : fatal error U1077 :'.\c1.exe' : return code '0x2
How to solve this issue.Please take a look into it.
Thanks.'
If you compile from the command-line, you should use the Visual Studio Command Prompt as it sets common environment variables that are used for compiling.
If for some reason you insist on using cmd.exe then you have to either add the include paths to the INCLUDE environment variable or you have to give the compiler the command-line parameter /IC:\Path\to\include
Details are available on MSDN
edit: well since this got recently upvoted I might as well add what I forgot last time. If you want to set up the environment variables that the Visual Studio Command Prompt uses you can just execute the vcvarsall.bat which is located in a directory like C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC for details consult the relevant MSDN page
Make sure you have the right platform toolset selected.
Project -> properties -> configuration properties -> Platform toolset
If you move a project from computer to computer via a flash drive or something, it can have an invalid toolset selected. That can cause intellisense to tell you that.
I am using cygwin in Windows 7 and is currently struggling with this:
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
I tried to google it but it turns out that most people use Visual Studio to debug.. and I insist to just use cygwin and emacs for the debugging purpose, and cygwin gave me that error. Is there any way for me to fix this?
Thank you for any answers!
You need to set up the environment variables for the Visual Studio compiler so that you can use it in your cygwin environment. I do this with a .BAT file on my desktop which sets up the environment and then starts a cygwin shell with everything ready to roll:
#echo off
call "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"
chdir C:\cygwin\bin
bash --login -i