Compilation Error in VS Studio compiling Fortran code - visual-studio

I am getting this error while compiling my Fortran code in VS Studio:
warning #31001: The dll for reading and writing the pdb (for example, mspdb110.dll) could not be found on your path.
I also looked to change the Base Platform Toolset in Project Properties, but in VS 2019 IDE I couldn't find this option to edit it.
I am using Intel Compiler 2021. I have also tried upgrading my VS Studio to latest version but the problem persists.
Please tell how to fix this.

This message is saying that your Visual Studio is misconfigured. Make sure that you have the "Desktop Development for C++" and "Windows 10 SDK" components of Visual Studio installed (see https://www.intel.com/content/www/us/en/developer/articles/guide/installing-microsoft-visual-studio-2019-for-use-with-intel-compilers.html) You may need to uninstall both the Intel compiler and Visual Studio, then reinstall.

Related

Build fails for C++/CX project with v141 platform toolset in Visual Studio 2019

I have tried to switch to Visual Studio 2019 since it is now officially released, but I am having problems building a C++/CX based project.
I have not retargeted the project, but it is still configured to use the v141 platform toolset, i.e. Visual Studio 2017 Build Tools.
As far as I can tell, I have specifically installed the required build tools in Visual Studio 2019, which should be evident here:
Still, according to the project properties, Visual Studio 2017 Build Tools are not installed:
And when I build the project I get the following error:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(378,5): error MSB8020: The build tools for Visual Studio 2017 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install Visual Studio 2017 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 "Retarget solution".
Am I still missing some components in my installation, or is this a bug in Visual Studio 2019?
EDIT I should point out that I still have Visual Studio 2017 installed on the same computer as well.
I had a similar issue, but this is what I was missing.
You will find these options on the Workloads tab of the VS installer on the right under Installation details (i.e. not under Individual components).
It turns out that the (Windows Runtime Component) project was not properly set up. In the .vcxproj file the ApplicationTypeRevision element was missing, which is also "evident" (if you know what you are looking for...) from looking at the project properties above, where only the General configuration properties node is visible, and the Target Platform value is empty.
Inserting the following line in the .vcxproj file immediately following e.g. the WindowsTargetPlatformMinVersion element should do the trick:
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
Most likely, it was also necessary to add the C++ Universal Windows Platform Tools. The v142 version was made available when trying to create a new C++ Universal Windows Platform project. As far as I could tell, this component was not otherwise visible in the Visual Studio Installer? Once the v142 component was installed, the corresponding v141 component was also available for installation.
I had this same problem for Visual Studio 2017, even though V141 was explicitly shown as installed. It turned out the problem was that VCTargetsPath was set in System Environment Variables to "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\V4.0\V140". Removing or unsetting this variable solved the issue.
I suspect this variable was set during an earlier install of Visual Studio 2015. Even after uninstalling all other Visual Studios the variable was never removed and the problem persisted.

Fresh installed Visual Studio 2017 won't create C++ project with error 0x80041fe2

I just installed Visual Studio 2017 (current time: August 2018). I only need C++ so I picked C++ component and deselected everything listed in "optional" items. Then after the installation, I cannot even create any C++ projects including both console and desktop projects. It gives me a error dialog of "Exception from hresult 0x80041fe2".
I did a search online. This question, visual studio and qt: HRESULT: 0x80041FE2, seems close but it's QT related, so it's different.
I did eventually find a solution. Will answer my own question below.
It turns out this is probably a Visual Studio installation bug. The "Optional" components are really not totally optional. I then picked the following Optional components and then it works:
Just-in-Time debugger
VC++ 2017 version 15.8 v14.15 latest v141 tools
C++ profiling tools
C++/CLI support
VC++ 2015.3 v14.00 (v140) toolset for desktop
Almost certainly not all of these are needed. But I don't want to spend time to find out which "Optional" is actually not optional...

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

Using the Node version of tsc with Visual Studio 2015 TypeScript Extension

I've a collection of .ts files that compile without error on Windows when running tsc v1.7.5 under node. When compiling the same files using tsc.exe v1.7.5, the compiler shows a bunch of errors in the source where there clearly are none. I think this may be a compiler bug and I am currently working to get the minimal reproduction.
But for the meantime, I'd like to see if I can get the TypeScript 1.7.6.0 Visual Studio 2015 extension to run tsc under node instead of using the tsc.exe version.
Is this possible?
I know this question is quite old and it's not really answer to your question but I had the same issue with TypeScript for VS2015 recently and found a solution. I've tried installing different versions of the TypeScript plugin from offical website: https://www.microsoft.com/en-us/download/details.aspx?id=48593 but it appears that the problem is withing the compiler, which is "bundled" with Visual Studio 2015:
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe
Updating the extension itself is not updating the compiler which is always 1.8.34 for me. It throws "tsc.exe Exited" errors when compiling in Visual Studio
I resolved the issue by running "Repair" option on the "Programs and Features -> Microsoft Visual Studio 2015". It just reinstalled Microsoft SDKs and problem went away. Hope it helps somebody

"program can't start because msvcp100.dll is missing" for Every single code

This error is taking toll of my training schedule.
Everytime I create any C++ application in my VS2010, It runs fine on my machine but if I run it on different machine, It starts with this error.
Error goes if I copy msvcp100.dll in System Folder then it shouts for some other DLL. It requires some 5-6 different DLLs.
Most irritating part is even if I write a simple Console based Addition program, It gives this error.
(I should not but)I would have agree if I design some fancy forms and all... But for simple Addition program????
Am I missing out somethings in Settings? or VS2010 to blame??
Somewhat related question: this But this problem seems different
By default, MSVC projects are set to link against the dynamic run time library which generates a dependency on the visual C++ run time redistributable. As you have already found out, this dependency is not guaranteed so your install utility has to install the visual c++ run time first.
You can avoid this by changing your project settings. Load the project properties and go to: "Configuration Properties"/"C/C++"/"Code Generation"
In the item labelled "Runtime Library", select "Multi Threaded (/MT)"
for the release version"Multi Threaded Debug (/MTd)" for the debug version.
You have to be careful while doing this that all the other libraries that your application links are also compiled against the static run time.
You need to have Visual C++ Libraries installed if you want to run your app.
Using the compiler options to change the runtime library worked for me ("Configuration Properties"/"C/C++"/"Code Generation". In the item labelled "Runtime Library", select "Multi Threaded (/MT)" for the release version and "Multi Threaded Debug (/MTd)" for the debug version). I did have to do both the debug and the release to get the release to work. Don't know why (it is possible that I did not do it correct the first time).
Note: I was using VC2010 Express version on Windows 7 to compile. I tested on an old XP machine.
Another note: MS information at http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=vs.100).aspx
If you have installed a new copy of Windows on your computer or have reinstalled one then you will come across an error called "The program can’t start because MSVCP100.dll is missing from your computer. Try reinstalling the program to fix the problem." on your computer.
The basic reason behind this error is that the Visual C++ doesn’t get installed when you reinstall or install a fresh copy of Windows operating system. In order to check Visual C++ is installed on your PC or not, open Control Panel → All Programs and Features and then search for Visual C++ in the software list. If you don’t find the software installed there then you have to install it.
I would suggest, first of all, install the Visual C++ 2010 package and check if it has solved msvcp100.dll missing error or not. If the issue is not resolved by the Microsoft Visual C++ 2010 then install 2013 or 2015 versions of Microsoft Visual C++. Here is the list of download links of Microsoft Visual C++ for both x86 and x64 architectures:
Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)
Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)
Visual C++ Redistributable Packages for Visual Studio 2013
Visual C++ Redistributable for Visual Studio 2015
→ The latest supported Visual C++ downloads
I hope, now you are able to fix “The program can’t start because MSVCP100.dll is missing error on your computer. To know more details, you can follow this guide.
Thanks

Resources