Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot link with nghttp2_static.lib #7446

Closed
zedalaye opened this issue Jul 19, 2021 · 2 comments
Closed

Cannot link with nghttp2_static.lib #7446

zedalaye opened this issue Jul 19, 2021 · 2 comments
Labels

Comments

@zedalaye
Copy link

Hi,

I'm trying to build libcurl.dll on Windows with Visual Studio 2017 with OpenSSL and nghttp2 as dependencies.

Link fails, telling it's unable to find nghttp2_static.lib. I found that build/link works if I change this line, removing the "_static" part.

NGHTTP2_LIBS = nghttp2_static.lib

Here is how I build NgHttp2 on Windows ($ means C:\Users\Me\Projects\externals\build-2021-07-19\) :

$ git clone ...
$ cd nghttp2
$ cmake -DCMAKE_BUILD_TYPE=Release ^
              -DCMAKE_INSTALL_PREFIX=..\deps ^
              -DENABLE_LIB_ONLY=ON ^
              -DENABLE_STATIC_LIB=ON ^
              -DENABLE_SHARED_LIB=OFF ^
              -H. ^
              -Bbuild
$ cmake --build build --config Release --target install

I'm not sure if it is due to a change in NgHttp2 or due to my build environment.

jay added a commit to jay/curl that referenced this issue Jul 19, 2021
- Support both nghttp2.lib and nghttp2_static.lib for static nghttp2.

nghttp2 briefly changed its static lib name to nghttp2_static, but then
made the _static suffix optional.

Ref: nghttp2/nghttp2#1394
Ref: nghttp2/nghttp2#1418
Ref: nghttp2/nghttp2#1466

Reported-by: Pierre Yager

Fixes curl#7446
Closes #xxxx
@jay jay added Windows Windows-specific and removed cmake labels Jul 19, 2021
@jay
Copy link
Member

jay commented Jul 19, 2021

The name was nghttp2_static.lib for a brief period, now the basename suffix is optional so you probably have nghttp2.lib. Please try #7447

@jay jay closed this as completed in 6b84f53 Jul 20, 2021
@zedalaye
Copy link
Author

I can confirm it's OK for me. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants