microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.75k stars 6.29k forks source link

How to install websocketpp with ssl? #21991

Closed morphogencc closed 2 years ago

morphogencc commented 2 years ago

I used to be able to install websocketpp with the feature ssl, but now when I search, I only see the main package websocketpp and one optional feature, recommended. When I try to compile my project, I get the error:

Severity    Code    Description Project File    Line    Suppression State
Error       websocketpp:x64-windows@0.8.2#1 does not have required feature ssl  sitara-websockets   C:\myProject\dependencies\my-websockets\proj\EXEC   1   

How should I go about installing the ssl feature now?

autoantwort commented 2 years ago

Yeah there is no feature ssl. But a feature recommended, but it is enabled by default

morphogencc commented 2 years ago

Yes, but when I run my code it gives me a compilation error because it requires the feature ssl -- neither the default or recommended feature seems to satisfy this requirement.

autoantwort commented 2 years ago

Do you use a vcpkg.json file?

morphogencc commented 2 years ago

Yes, I do use a vcpkg.json manifest file

morphogencc commented 2 years ago

I just tried this again with the latest commits of vcpkg, and I'm having the same issue.

A vcpkg.json with:

"dependencies": [ { "name": "websocketpp", "features": ["recommended"] } ]

fails (no feature ssl exists); and both recommended and the default featureset give me an error

Severity    Code    Description Project File    Line    Suppression State
Error       websocketpp:x64-windows@0.8.2#1 does not have required feature ssl  sitara-websockets   D:\Projects\myProject\dependencies\mylib-websockets\proj\EXEC   1

Do you have any suggestions as to why this might be occurring?

autoantwort commented 2 years ago

Maybe run vcpkg with --debug and use the command line directly

morphogencc commented 2 years ago

Thanks! I didn't realize there was a debug with so much useful information... it looks like recommended does in fact build with ssl, but a dependency I was using had the old ssl feature in its own vcpkg... Updating that seems to have resolved the issue! Thanks!

autoantwort commented 2 years ago

but a dependency I was using had the old ssl feature in its own vcpkg

Is it a public port here that needs to be fixed?

morphogencc commented 2 years ago

Fortunately not -- it was from a collaborator's repository. Everything looks good on vcpkg as far as I know!