I'm building a C++ app which uses the libgit2 library to interact with a git repo. I've installed libgit2 through vcpkg, which also installed the pcre library which libgit2 needs. So far, so good. When I build my project there is no issue, only when I launch the app it throws an error that pcre.dll is not present. This is correct, pcre.dll isn't in my output folder as none of my code has any interaction with it. Libgit2 needs it.
How can I get the dependency of the dependency to be included in my final build?
Pcre is present and accounted for, but none of my code uses it so it doesn't get included in the build of my app. The git2.dll does get included with the build. The paths that need to be added to Visual Studio are there, managed by vcpkg. Everything is setup so that pcre could be included in a build if need be.
I use libgit2 v 1.1.0, Visual Studio 2019 and the latest stable version of vcpkg.
I'm running into the same issue and have opened a PR: https://github.com/microsoft/vcpkg/pull/18289
Based on Neumann-A's feedback in the PR, it looks like there may be a bug preventing the pcre DLL from getting copied to the release/deployment files. For now, you're welcome to use my vcpkg fork which exposes the "builtin" REGEX_BACKEND CMake option, which works around this problem. https://github.com/motevets/vcpkg/tree/fix-libgit2
Related
The vcpkg helps to manage libraries for C++ projects on Windows/macOS/Linux.
On Windows one can
vcpkg integrate install
https://vcpkg.readthedocs.io/en/latest/users/integration/
But outside Windows that does not seem to exist. Am I wrong?
That end up making CMakeLists.txt made on Windows not portable to macOS/Linux. While migrating a project from Windows to macOS I found I have to add
include_directories(~/vcpkg/installed/x64-osx/include)
otherwise make will fail to find header files.
When importing existing library projects into an existing solution (after I copied them locally from somewhere else), when I try to install or uninstall a Nuget package through the package manager, it justs builds my solution showing me all of the errors I have because the package is not installed. It does nto try to install or uninstall the package. Why is it building my project instead of just installing / uninstalling the bloody package?
Why is it building my project instead of just installing /
uninstalling the bloody package?
It's not default behavior of VS IDE itself.
As for VS2017, if we install a normal package using Package Manager UI, VS will check the compatibility between the package to consume and the current project. If they're compatible, the package will be installed successfully, if not, VS will throw nuget error like NU1202 or others in ErrorList window.
But I'm sure for VS2017, installing/uninstalling won't call a build.
Possible causes of the issue and corresponding suggestions:
1.This behavior results from one third-party extension.
Reset all VS settings => disable all the third-party extensions => restart VS to check if the issue persists. If after the check you find this issue results from one extension, you need to make sure if the extension provides one option to turn on/off the auto-build. Or you may need to disable/uninstall the extension temporarily and contact the author of the extension to post the issue.
You may get more details for trouble-shooting from this similar issue.
2.Custom script(.ps1,.targets) from one specific nuget package causes this.
The authors can place powershell script and PackageID.targets in .nupkg when generating packages. Some of these scrips will execute when we install the package, others will execute when we uninstall the package. See similar issue here.
You can create a new simple console project TestProject in TestProject solution. Then right-click solution=>add=>Existing project to import a new external project. Now let's install the Newtonsoft.Json package to check if the issue disappears. If the issue disappears in new project with Newtonsoft.Json package. I think it indicates one special package you try to install/uninstall may cause the issue.
Hope all above helps and feel free to let me know if there's any update.
I need to build Secure Remote Password protocol library (SRP/libsrp) for old project from 2010. I can't figure out how to build it for Win32.
I found this link with latest source code:
http://srp.stanford.edu/download.html
Version 2.1.2 was used in project. There is link for Win32-binaries, but it's dead.
So the only way to get binaries is to compile the source code.
In Win32\README was said to put OpenSSL includes and compiled libs in related folder (include, lib, etc.).
I can't figure out what version of OpenSSL should be used. On the web page was said something about patching version 1.0.0.0, but I used the latest version of OpenSSL.
Then it was said to open "srp_openssl.dsw" file (which is VC++ 6 Workspace) and rebuild everything to get binaries.
The result is hundreds of errors related to the obsolete language and related to the OpenSSL. Also need to take into account that OpenSSL changed library names.
So, is the only way - to use OpenSSL 1.0.0.0 and VC++ 6 to build SRP? Also, are there any binaries in the internet?
I am trying to compile dlib 19.4 using the vcpkg tool
since I am having trouble compiling CMAKE and working with Boost.Python
to fix compiler issues for dlib.
Though I am having problems even running the basic steps
to get the vcpkg package to work:
(I also downloaded Visual Studio 2017 for this tool)
Looking at executed command (git init), you initialized empty git repository for vcpkg - that is likely wrong. This bootstrap.ps1 script fails internally when trying to fetch existing revisions. vcpkg doesn't want to reside in just any git repository, it wants "its" git repository. vcpkg uses git as a distribution platform and later to perform updates.
So instead, you should clone vcpkg repository to some directory, e.g.:
C:\test>git clone https://github.com/Microsoft/vcpkg.git vcpkg_test
Cloning into 'vcpkg_test'...
...
Checking out files: 100% (876/876), done.
C:\test>cd vcpkg_test
C:\test\vcpkg_test>powershell -exec bypass scripts\bootstrap.ps1
https://github.com/Microsoft/vcpkg/
Additionally I see errors regarding VS2017 C++ support. VS2017 is an IDE with multiple optionally supported languages (i.e. you could have only C# support installed). Please make sure you have "Desktop development with C++" workload installed - as vcpkg is for C++. You can update the installation at any time by running installer again (Modify).
https://learn.microsoft.com/en-us/visualstudio/install/install-visual-studio
So I'm trying to build this library that is a .NET binding for Mapnik http://mapnik.org.
I ran the "../ext/install.cmd" file successfully but I think that only builds
the boost library for c++. When I run the visual studio solution for it afterwards it still has like 900 errors!
Mostly in 1 class for text rendering.
http://sourceforge.net/projects/mapniknet/
I would love to use this library if anyone can help me get the build to run succesfully.
My system:
Win7 64bit
On systems older than Windows 7 patching can not be run if there are spaces in "Program Files" folder name.
You can patch mapnik and ICU sources manually applying Mapnik.patch on MapNik folder and icu_vs2010.patch on icu one.
If sources were changed previously they should be reverted before patching.
After patching rerun install.cmd