I'm using vcpkg as library manager for my Visual C++ projects. Sometimes I link libraries dynamically and vcpkg provides dll's in \vcpkg\installed\x64-windows\bin folder.
When I run project in Debug or Release mode I have error related to missing DLL. What is elegant way to organize Visual C++ to take dll's from vcpkg folder?
Related
We're currently making a build environment for some of our projects.
In particular we're using VC++ 6.0 and VS2019 to build some of these projects.
When building our C++ project in VS2019 with the Platform Toolkit set to C++ 2015 v140, MSBuild attempts to use the VC++ 6.0 compiler to build the project. If I switch the Toolkit to any other version it builds with the correct cl.exe.
If I remove the VC98 folder that contains cl.exe from the path environment variable I get a cl.exe can't be found error in VS2019.
So I think there's something hardcoding the 2015 toolkit against the VC6.0 cl.exe.
I've tried installing and reinstalling the additional components in the VS Installer but no luck.
Repair of VS2019 didn't fix it either.
I've tried all versions of Visual Studio back to 2013 same issue.
This looks like an MSBuild issue, it's in the wrong location.
Is there any place where I can view the mapping for the toolkits in MSBuild? I couldn't see much in the registry.
The output when I build shows the following, the version is clearly a very old compiler (the VC6.0 one):
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
uWebSockets https://github.com/uNetworking/uWebSockets
How to use this from Visual Studio C++ ? I wish to implement a simple websocket server. I don't want to use Makefile, wish to use normal visual studio project build.
This is how to use uWebsockets from Visual C++ IDE project, step by step:
Install Vcpkg https://github.com/microsoft/vcpkg
then command line the following
set VCPKG_DEFAULT_TRIPLET=x64-windows
vcpkg install uwebsockets
At this point there is then a folder vcpkg\installed\x64-windows which contains the header files and library files and dlls (if you need the dlls).
In your Visual C++ project properties set the include directory and lib directory in the VC Directories.
Then #include <uwebsockets/App.h> and paste code from uwebsockets.
How do I install MSVCR90D.DLL? I have a small test DLL(debug mode) that I created a setup project. In my setup project, I included merge modules & policy for vc90_debugcrt_x86.msm, etc. When I install the DLL on my VM, dependency walker still reports that MSVCR90D.DLL cannot be found?
Thanks in advance.
See here.
Preparing a Test Machine To Run a
Debug Executable
Microsoft does not officially support deploying debug runtimes outside of dev/test environments but you can make it work if you need to. Sounds like this is a vanilla test environment installation, though.
Just copy the MSVCR90D.DLL file into the same directory as your own dll. Then both your dll and dependency walker will find the MSVCR90D.DLL file.
You may need a couple of other files like msvcp90d.dll or msvcm90d.dll but dependency walker knows if you need them for your purposes.
MSVCR90D.DLL is the debug version of the Visual Studio Runtime Libraries. Normally, if you're deploying that code, you would build it in Release mode and also provide/install the Visual Studio Runtime Redistributable. As far as I know, the only way to obtain the debug dlls are through a Visual Studio install.
The py2exe utility that converts Python scripts into executable Windows programs seems to have a similar problem here. Maybe the section "Bundling the C runtime DLL" helps you to find the solution.
I have downloaded Visual C++ 2008 and I also have the Boost library, v. 1.44.0. How to can the Boost library be installed in C++?
I also have Visual C++ 2010.
You don't have to "install" Boost in Visual Studio. What you need is to point your IDE (in this case Visual Studio) to the folders which contain the Boost headers and the lib files (if you have built Boost - some Boost libraries are header-only, some need to be built). Take a look at Boost Getting Started for further details.
Quick start:
start your command prompt and go to the folder in which you have unzipped boost
execute bootstrap.bat
execute ".\bjam --build-type=complete stage" - this will build almost everything in Boost.
Note: make sure you have the VC++ compiler and linker in the environment variable PATH.
After running the conversion wizard for a VC++ 2003 project - which ends with no errors - I get VC++ 2008 to sucessfully compile the project. Then, when launching the exe, a message pops up saying that the program cannot start because MSVCP71D.dll is missing. Any ideas on why a project compiled on vc++ 2008 would ask for MSVCP71D.dll ?
TIA
Update: I am trying to compile the ARToolkit using VC2008.
http://sourceforge.net/projects/artoolkit/files/artoolkit/2.72.1/ARToolKit-2.72.1-bin-win32.zip/download
What binary files came with the project? You seem to be linking against a static library or DLL that was built with VS7.1 -- hopefully you can rebuild that file in VC9 there.
Also, for what it's worth, note that the D at the end of "MSVCP71D.dll" indicates that it's looking for a debug build of that DLL.
The ARToolkit has several libraries in the lib folder, some of which with that same "d" suffix indicating a debug build -- those libraries were most likely built in VS2003 given your results. I'm not sure if you can rebuild in VS2008 from the lib/SRC directory, but that might be a start.
Looks like you need to build it as "release" so that the application does not look for that debug library at run-time.