Needs to compile the missing `detour 3.0` lib in Visual Studio - boost

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).

Related

Do I still need to install Microsoft VC++ 2015 runtime redistributable if I already have Microsoft VC++ 2017 runtime installed?

From what I read about these posting and elsewhere, regarding the issue of why I cannot install Microsoft VC++ 2015 runtime redistributable if I already have Microsoft VC++ 2017 runtime installed.
The reason for this "cannot install" is because once you have Microsoft VC++ 2017 installed, there is no need to install 2015 version,as 2017 subsume 2015. Am I right?
Secondly, and more crucially, from now onwards if I have a higher version of Microsoft VC++ installed, I can safely skip the lower version, this is going to be Microsoft strategy: going forward there is only one version of Microsoft VC++ ( the latest one). Am I right? I remember I read this elsewhere, but not sure my understanding is correct or not, and now I couldn't find the blog post. So I hope that I can get some confirmation here.
The VC++ runtime redistributables are the same for VS 2015, 2017 and 2019! From Microsoft Support:
Note Visual C++ 2015, 2017 and 2019 all share the same redistributable files.
However, there have been many different versions of this redistributable package released! The installer programs (linked below) will do the required checks, to see if a more recent version is already present on the target computer, and signal if so.
The runtime libraries that comprise this redistributable package are sometimes (confusingly) referred to as Visual C++ "14" Runtime Libraries. (The "14" comes from the fact the Visual Studio 2015 includes version 14 of the MSVC compiler; VS2017 = MSVC v15; and VS2019 = MSVC v16.)
Whether or not future versions of Visual C++ will also share the same redistributable package is not certain.
The latest versions, for the three supported processor platforms, can be downloaded and/or installed from the following links:
x86 - vc_redist.x86.exe
x64 - vc_redist.x64.exe
arm64 - vc_redist.arm64.exe
EDIT: There may be some confusion, here, over the 'version check' I mentioned above! From the same Microsoft Support page:
For example, installing the Visual C++ 2019 redistributable will
affect programs built with Visual C++ 2015 and 2017 also. However,
installing the Visual C++ 2015 redistributable will not replace the
newer versions of the files installed by the Visual C++ 2017 and 2019
redistributables. This is different from all previous Visual C++
versions, as they each had their own distinct runtime files, not
shared with other versions.
I interpret this as meaning that, if you have an 'older' version of the vc_redist installation (released, say, with VS2015), it's components will be updated by any newer installation. However, running an older installer will not conflict with a more recent installation.

Where is the Visual C++ Update 2 Runtime

Visual Studio 2015 Update 2 has been released for 7 days. Where can I download the Visual C++ Update 2 runtime so I can run the applications compiled with Visual C++ 2015 Update 2?
Here is the download
Microsoft Visual C++ 2015 Redistributable installs run-time components
of Visual C++ libraries. These components are required to run C++
applications that are developed using Visual Studio 2015 Update 3 and
link dynamically to Visual C++ libraries. The packages can be used to
run such applications on a computer even if it does not have Visual
Studio 2015 installed. These packages also install run-time components
of C Runtime (CRT), Standard C++, MFC, C++ AMP, and OpenMP libraries.
Microsoft Visual C++ 2015 Redistributable includes bug fixes to the
runtime DLLs and also the latest versions for KB 2999226.
There are two files in the Visual Studio 2015 Update 2 VC++ Redistributable package.
vc_redist.x64.exe (v14.0.23918.0).
https://download.microsoft.com/download/0/5/0/0504B211-6090-48B1-8DEE-3FF879C29968/vc_redist.x64.exe
vc_redist.x86.exe (v14.0.23918.0).
https://download.microsoft.com/download/0/5/0/0504B211-6090-48B1-8DEE-3FF879C29968/vc_redist.x86.exe
For those that care, the x64 version sets the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum\UpdateVersion (REG_SZ) to the value "14.0.23918".
For the x86 version, check for the existence of the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{2e085fd2-a3e4-4b39-8e10-6b8d35f55244} If it exists, the update is already installed.

Install WinCE 5.0 Platform Builder SDK - build code with Visual Studio 2012 or higher

I have a Windows CE 5.0-based Platform Builder image. It is intended to be installed on Visual Studio 2005. My team would like to upgrade our build tools to utilize Visual Studio 2012, but Visual Studio 2012 does not support this platform image.
To be clear; I am not asking whether or not Visual Studio 2012 (or higher) supports Platform Builder SDKs targeting Windows CE 5.0. That question has already been answered (more or less), and the answer is clearly "No."
Instead, what I'd like to do is install the Platform Builder SDK, and manually modify the Visual Studio 2012 environment to allow compilation of my Windows CE code. Features like remote debugging and deployment are acceptable losses to my team; we have our own pathway for deployment and debugging on our embedded device. What I'm really hoping to gain is simply the ability to build WinCE 5.0 code in VS2012, which was intended for VS2005. I am attempting to reduce the number of Visual Studio installations, and get access to the superior intellisense faculties of newer versions of Visual Studio.
Does anyone know if this is possible? How would I go about doing that?
There does not appear to be a way to do this, in such a fashion as to no longer require Visual Studio 2005.
You can, however, use registry hacks to force Visual Studio 2012 to build a WinCE 5.0 project by utilizing the compiler binaries from Visual Studio 2005, during compilation. This would allow you to develop code in VS2012, but would also require that VS2005 be installed for a successful build.
Here is an article explaining the steps to set this up.
VS2012 doesn't have any of the Windows CE compilers. The last one that shipped with compilers compatible with CE 5.0 was VS 2008, so that's the "latest" version you'll be able to use to build. (VS2012 is capable of building for Windows CE, but only for WEC 2013, and only after installing a WEC 2013 SDK, which includes the requisite compiler pieces).
In short, there's no way you can get VS2012 by itself to compile a CE 7.0 or earlier app.
There is a plug-in for VS 2013 that will allow you to use that IDE for managed code (I've never used it, so I can't say how well it works), but it still requires VS 2008 to be installed to get the compilers.

Static library compiled with Visual C++ is compatible with a higher version of Visual C++?

I have compiled a static library with Visual C++ Express 2010. This library can be used for example with Visual Studio 2013 (using C++)?
Generally, no. A static library can only be used with a project that's built using the same compiler version and substantially the same settings. For example, even when using the same VC version, you can't combine a library built with Debug configuration and another module built with Release, or vice versa.
Since you say you've compiled the library, this means you have source code for it. Why not just rebuild it with VC2013?
This has since changed: binaries built using Visual Studio 2015 or newer can be used in any Visual Studio release that is more recent. See https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170

Using a C++ Library (built using Visual C++ 2010) in a Windows 8 Store app (built using Visual C++ 2012)

I have a C++ library built using VC++ 2010. I have the headers, import libs and DLLs for this library. I want to use this library in my Windows 8 Store app that I am trying to build using VC++ 2012. My app works fine on my local machine but when I try to run this app on a remote Windows 8 device, the app fails to load. What am I doing wrong?
You cannot use C++ binaries built using older version of Visual Studio (older than Visual Studio 2012) in your Windows 8 Store apps.
The reason for that is because a binary built using say Visual Studio 2010 will have a dependency on the C++ Runtime DLLs from Visual Studio 2010. Whereas the rest of your app is written using Visual Studio 2012 so it will have a dependency on C++ Runtime DLLs from Visual Studio 2012. The latter is made automatically available from the Windows Store (read this for more details). However the former is not available on the Windows Store. Also, there is no way for your app to express a dependency on VC2010 Runtime. Including VC2010 Runtime DLLs inside the app package will also not work since the package will be rejected at Store upload time.
Therefore the best option is to build all sources for your Windows 8 Store app strictly using Visual Studio 2012.

Resources