In Visual Studio 2017 RTM VC\Tools\MSVC\14.10.25017\lib folder, there is one folder called "onecore", inside there are folders for x64, x86 and arm, each containing some .lib files that already exist VC\Tools\MSVC\14.10.25017\lib{x64,x86,arm}. What is the function of these duplicates?
Also, what is the meaning of thus "onecore" anyway?
OneCore is a Microsoft term for different targets like mobile, desktop and IoT. The libraries are intended to be used by C++ programs for those targets. E.g. heed that MFC and C++ AMP are not part of OneCore.
The OneCore libraries are also part of the Visual Studio MSVC Redist folder.
I believe those are C++ runtimes for Universal Windows Platform applications.
Related
I am inheriting a C++ code base on Windows in Visual Studio 2019 and I'm trying to compile the code, but it seems like VS cannot find the header files in the MFC library, e.g. "afxdialogex.h". I couldn't find any sources on the internet on how to install MFC and it seems like it should come with Visual Studio. Any ideas?
Disclaimer: I have zero Windows experience as I have exclusive used *nix systems until now.
As documented:
In Visual Studio 2017 and later, MFC and ATL are optional sub-components under the Desktop development with C++ workload in the Visual Studio Installer program. You can install ATL support without MFC, or combined MFC and ATL support (MFC depends on ATL). For more information about workloads and components, see Install Visual Studio.
You can either select MFC when choosing workloads (on the right-hand side), or choose individual components.
I am going to compile old project(visual studio 2012 platform-v110xp) in visual studio 2013 or Visual Studio 2019.
It's using boost and Microsoft detour 3.0 libraries.
But the detour 3.0 has been deleted accidentally.
And now I can only find detour4.0.
But I get an error like this
How do I get the detour 3.0 lib?
C++ Static Libraries built with VS 2015, VS 2017, or VS 2019 are "binary compatible", but that's not true of any other versions of Visual C++. For example, a static library that links with VS 2012 won't necessarily work when linked with VS 2013 code. See Microsoft Docs.
I don't know exactly what toolsets are involved but that's the likely cause of the link issues. The main thing is to make sure all the static libraries and main executable is built by the same compiler version.
Note that DLLs and their export libraries typically use only "C-style" binding so they can be binary compatible with multiple generations of compilers.
VS 2019 includes the v141_xp platform toolset (i.e. the VS 2017 compiler using the Windows 7.1A SDK that is compatible with Windows XP / Windows Server 2003).
I have a cmake project (cmake 3.19.0-rc1) that I want to build using Visual Studio 2019 (Microsoft Visual Studio Community 2019 Version 16.7.6). There are no toolchain files in the project.
The solution and project files are created via
cmake -G "Visual Studio 16 2019" -A Win32
The solution is created successfully with the Win32 target platform. The first build works as expected.
However after that, Visual studio informs me that the project and solution file has changed outside of the IDE and that they need to be reloaded. After that the target platform is x64.
I can manually re-add the Win32 target platform, but with every compilation, visual studio resets the target platform to x64.
How can I stop this behavior and just stick with the Win32 platform?
Apparently it was a Visual Studio extension (Clang Power Tools) that decided it needs to edit the stamp files. This caused a recreation after the build process.
The problem was solved by deactivating and deinstalling the Clang Power Tools extension.
I want to distribute msvcr100.dll and msvcp100.dll in the application local folder along with my .exe I don't want to use the vcredist_x86.exe installer, static linking or a msm merge module.
Where can I find the correct versions of these files? VC++ Express doesn't have a \Program Files\Microsoft Visual Studio 10.0\VC\redist\x86\ folder as described on msdn. I'm concerned about trying to take them from \Windows\System32 in case they're the wrong version or its somehow not correct.
Microsoft Visual Studio's linker has a /DRIVER flag specifically for building drivers:
Use the /DRIVER linker option to build a Windows NT kernel mode driver.
However, Microsoft says:
You must not build drivers by using the compiler or linker that Microsoft Visual Studio provides.
which begs the question:
Why should I not compile/link drivers with Visual Studio?
Is the output generated by the DDK/WDK tools different from that generated by Visual Studio?
If so, how is it different?
Edit:
Notice that I'm talking about using Visual Studio's compiler and linker, not libraries!
I use the WDK headers and libraries with VS's compilers and linkers, but Microsoft specifically says that I need to avoid this:
You must not build drivers by using the compiler or linker that Microsoft Visual Studio provides.
They didn't even mention headers and libraries, so of course that's not my question.
Why?
This article put me on the right track, I think. That's because the DDK tools use different runtime libraries than Visual Studio.
Visual Studio will link the driver with the runtime libraries it provides (or optionally, the latest version of the runtime installed on the system), but a driver should arguably be linked with the exact same runtime used to build the operating system itself.