Cannot open file 'pgort.llib' after adding /GENPROFILE flag - windows

I'm trying to follow the instructions here to add PGO for my project. After I added the /GENPROFILE flag, I start getting the link error:
LINK : fatal error LNK1104: cannot open file 'pgort.lib'
After debugging it a bit, I believe the problem is that my Library Directories (found under VC++ Directories tab) has a value of $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) which is evaluating to:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\lib\spectre\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\atlmfc\lib\spectre\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\lib\x64
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\UnitTest\lib
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\lib\um\x64
It looks like the .\spectre\x64 paths don't have the pgort.lib library, but the non-spectre path does:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\lib\x64
What do I do to fix this? I find it hard to believe that if I'm using the spectre binaries (which I am not even sure how/why I am in the first place) that I can't optimize my project.
BTW, I tried this on a machine with Enterprise VS installed and it's the same. So this isn't specific to Community edition.

I ended up updating my build configuration/scripts to dynamically update the LibraryPath to add the appropriate, architecture-specific version of $(VC_LibraryPath_VC_x64_Desktop) when compiling for PGO.

Related

fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory

I am referring to C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\ WDK files. Though I have installed latest 10.0.15063.0. It seems some files are missing in 10.0.14393 folder.
Anyone could help me to in this. Reparing Microsoft Visual Studio15 or reparing wdk 10.0.15063 does not help.
Ensure you have installed "Universal CRT" component of your visual studio.
More over for newer versions of Visual studio
in case the directory "C:\Program Files\Windows Kits" exists on your system ensure that it contains "10/Include" and "10/Lib" subdirectories.
If not create hard links there to thoose present in your "C:\Program Files (x86)\Windows Kits\10"
As you can see from C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\uCRT.props
the path "C:\Program Files\Windows Kits" is prefered over "C:\Program Files (x86)\Windows Kits" if it exists.
In Visual studio go to Project -> Properties -> VC++ Directories -> Include Directories and add:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt
In Project -> Properties -> VC++ Directories -> Library Directories add:
C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64
That's it, your program should now compile without errors!

VS2017: “Cannot find the resource compiler DLL. Please make sure the path is correct.”

I am using Visual Studio 2017. When I try to build a solution, I encounter this error:
Cannot find the resource compiler DLL. Please make sure the path is correct.
I checked my system, and found that the v7.0, v8.0, v8.0A, v8.1A, and v10.0A SDKs are installed on my machine. I checked my project properties, and the default SDK is v8.0
Me too, i have only the "windows 10 sdk version 10.0.15063.0" installed, and solved after:
Copy rddll.dll from:
c:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\rcdll.dll
to:
c:\Program Files (x86)\Windows Kits\10\bin\x86\
ref link: https://developercommunity.visualstudio.com/content/problem/43024/ide-cannot-find-the-resource-compiler-dll-rcdlldll.html
Just a temporary workaround, but it works.
Edit:
Run Visual Studio Installer from start menu, and click Update, after a while it's done, all thing worked.
it's doesn't need to copy file any more.
you could copy from
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64\rcdll.dll
to
C:\Program Files (x86)\Windows Kits\10\bin\x64\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\x64\rcdll.dll
and copy from
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86\rcdll.dll
to
C:\Program Files (x86)\Windows Kits\10\bin\x86\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\x86\rcdll.dll
The reason is that Visual Studio cannot find the requested files.
You have to (re)install or repair the requested version through Visual Studio Installer.
You can reach that through Visual Studio menu bar -> Tools -> Get Tools and Features -> Individual Components -> find and tick the respective {version} tools to install and then click "Modify".
It should work after that. Best of luck.
you can just simply change the compiler from resource compiler to C / C++ Compiler and you can do that by simply making a resource and you will face that error, after that right click the empty resource that have been generated and on the folder of resources right click the [nameofyourproject].rc and then choose properties and from item type change it to C / C++ Compiler and then delete that resource and create a new one and you will find it works fine with you.

APPX0502 Build fail in tfs but work in visual studio 2015

I had many problems, but this is something that can not be resolved when the TFS makes a compilation fails but works well when the compilation is done from the Visual Studio 2015.
I have installed: TFS 2015.
Error:
(1736,5): Error APPX0502: File 'C:\Program Files %28x86%29\Windows
Kits\10\Include\WinRT\AppxManifestSchema2010_v2.xsd' not found.
I hope someone can help me.
I resolved this on my Dev Machine by copying 2 files from the Win8.1 Kit to the Win10 kit folders
Source:
"C:\Program Files
(x86)\Windows Kits\8.1\Include\winrt\AppxManifestSchema2010_v2.xsd"
"C:\Program Files (x86)\Windows
Kits\8.1\Include\winrt\AppxManifestSchema2013.xsd"
Target:
"C:\Program Files (x86)\Windows
Kits\10\Include\winrt\AppxManifestSchema2010_v2.xsd"
"C:\Program
Files (x86)\Windows Kits\10\Include\winrt\AppxManifestSchema2013.xsd"
No idea how legit this is, or why it it needed for building from MSBuild when you can build fine in VS.

VS2012 doesn't include winres.h any more?

After installing VS2012, I can't find winres.h under folder "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC". What happen to VS2012 and why remove this header file?
By the way, in VS2010, winres.h locates in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include"
The file is part of the Windows SDK now and since VS2012 the SDK location is different, it's now called a 'Kit' and is found in Program Files/Windows Kits. Sepcifically you can find winres.h in
C:\Program Files (x86)\Windows Kits\8.0\Include\um

How do I fix the "Prerequisite cannot be found for bootstrapping" warning in Visual Studio 2010?

I am using:
Visual Studio 2010 on a x64 machine
Building a Windows Application
Targeting .NET Framework 4 Client Profile and x86.
I am deploying with ClickOnce.
I have installed the "Microsoft Windows SDK for Windows 7 (7.1)".
Here is my problem:
On an old project, on the project properties, Publish tab, Prerequisites... button, I open this dialog box. All the listed prerequisites have a yellow, triangular warning, stating, "Prerequisite cannot be found for bootstrapping". The effect is that the ClickOnce setup.exe cannot correctly install the prerequisites for users.
If I create a new, empty project from scratch, the Prerequisites box is empty.
Here is information about various folders:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages contains all the bootstrap packages.
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages contains all the bootstrap packages.
C:\Program Files\Microsoft SDKs\Windows\v7.1 did not have a Bootstrapper folder.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\SDK that has nothing in it but an empty v3.5 folder .
Environment WindowsSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\
Registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\GenericBootstrapper\4.0\Path = C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
Here is what I have tried:
I have tried copying the Bootstrapper folder from C:\Program Files\Microsoft SDKs\Windows\v7.0A\ to C:\Program Files\Microsoft SDKs\Windows\v7.1 but that did not make a difference.
I have tried copying the Bootstrapper folder from C:\Program Files\Microsoft SDKs\Windows\v7.0A\ to C:\Program Files (x86)\Microsoft Visual Studio 10.0\SDK\v4.0. That did not make a difference.
Any suggestions?
Try this:
make the prerequisites with bootstrapper manifest generator
then add them into C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\Bootstrapper\Packages folder
If it works please notify by comment..

Resources