Closed 3UR closed 5 months ago
Also this is NOT an huge issue for me if I can't do it but I honestly like having minimal DLLs
This is what happens when I attempt to set Use Static Libraries
to True on a project which doesnt even use Qt 5 but just uses the same manifest
1>Loading dependency information for 170 packages...
1>qt5-webengine is only supported on '!static', which does not match x86-windows-static. This usually means that there are known build failures, or runtime problems, when building other platforms. To ignore this and attempt to build qt5-webengine anyway, rerun vcpkg with `--allow-unsupported`.
I hope that there is an way to make specific libraries statically linked
This is what happens when I attempt to set
Use Static Libraries
to True on a project which doesnt even use Qt 5 but just uses the same manifest1>Loading dependency information for 170 packages... 1>qt5-webengine is only supported on '!static', which does not match x86-windows-static. This usually means that there are known build failures, or runtime problems, when building other platforms. To ignore this and attempt to build qt5-webengine anyway, rerun vcpkg with `--allow-unsupported`.
I hope that there is an way to make specific libraries statically linked
It's also an issue because this project out of many is a installer for my app and it should not require DLLs they should all be statically linked
The error message indicates that the library you are trying to install depends on qt5-webengine
, but qt5-webengine
does not support static. You can try adding the option --allow-unsupported
to the install command to install this port.
You can try adding the option
--allow-unsupported
to the install command to install this port.
Or you you better don't waste time on it, for qt5-webengine.
https://learn.microsoft.com/en-us/vcpkg/users/triplets#per-port-customization
Or you you better don't waste time on it, for qt5-webengine.
I also use Qt 5 which doesn't support me statically linking
I was wondering why you were claiming that, but ...
qt5-webengine is only supported on '!static'
... the actual problem is qt5-webenginge? Please check: is it really needed (direct dependency), or did some manifest added qt5
out of laziness? qt5
means ALL of qt5, and that's almost never true.
The error message indicates that the library you are trying to install depends on
qt5-webengine
, butqt5-webengine
does not support static. You can try adding the option--allow-unsupported
to the install command to install this port.
Nothing in this project where I want to enable static linking requires qt5-webengine
all of the C++ code uses boost but I do have other projects what depend on qt5-webengine
(completely unrelated to this installer project though)
here is a example of my structure
- project1
- project2
- vcpkg_installed
- xxx.sln
- vcpkg.json
project1
and project2
share the same manifest for Vcpkg, project1
is a installer which uses only boost
, project2
is an ide which uses Qt 5 and qt5-webengine
project1
does not use anything from project2
either only they share the same manifest
You can try adding the option
--allow-unsupported
to the install command to install this port.Or you you better don't waste time on it, for qt5-webengine.
Yep, I want to enable static linking for everything except for Qt
I also use Qt 5 which doesn't support me statically linking
I was wondering why you were claiming that, but ...
qt5-webengine is only supported on '!static'
... the actual problem is qt5-webenginge? Please check: is it really needed (direct dependency), or did some manifest added
qt5
out of laziness?qt5
means ALL of qt5, and that's almost never true.
qt5-webengine
is not a dependency of my project where I wanna enable static linking but it does use the same manifest as my project which uses qt5-webengine
I just am wondering would there be some kind of way to select what libraries I want static linking for manually?
I just am wondering would there be some kind of way to select what libraries I want static linking for manually?
You can change it for select ports by triplet file customization. This is the link in https://github.com/microsoft/vcpkg/issues/39504#issuecomment-2188310582
But I wouldn't be too optimistic about a dynamic qt5-webengine monster (with some dependencies not de-vendorered) working well with everything else being static.
I just am wondering would there be some kind of way to select what libraries I want static linking for manually?
You can change it for select ports by triplet file customization. This is the link in #39504 (comment)
But I wouldn't be too optimistic about a dynamic qt5-webengine monster (with some dependencies not de-vendorered) working well with everything else being static.
Is this CMAKE only?
Is this CMAKE only?
This is general vcpkg.
CMake is the general scripting language in vcpkg. It doesn't imply that you have to use CMake for your projects.
@dg0yt So from my understanding I will have to edit? %vcpkg_root%\triplets\x86-windows.cmake
I guess I will have to clone vcpkg into my repo now because currently it is installed with Visual Studio X:\Program Files\Microsoft Visual Studio\2022\Preview\VC\vcpkg
but obviously ediitng x86-windows.cmake
on my side only to be static isnt really a good idea
Ok I am now using a submodule for vcpkg I will close this
Note that vcpkg also has "overlay triplets" - so it could work with VS vcpkg.
I am completely unsure how to do so here are some details
Environment
Vcpkg is in manifest mode Using Visual Studio 2022
Issue
if I go to
Properties -> vcpkg -> Use Static Libraries
it will try to make every library in myvcpkg.json
linked statically, this is an issue because I also use Qt 5 which doesn't support me statically linkingSo my question is if I have for example
sdl2
in myvcpkg.json
and I want to link that statically but everything else dynamic how would I go doing so