-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Static linking broken on windows #3035
Comments
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I try to use the libmosquitto package in my project with static linking. I use
-static
linker flag and I get the linker flags for the package like this:pkg-config --libs --static libmosquitto
. The output of the pkg-config is-lmosquitto
.The issue has been analysed and patched in msys2/MINGW-packages#20604
Expected behaviour
The flags provided by pkg-config should work as is.
Actual behaviour
The linker fails like this:
cannot find -lmosquitto: No such file or directory
Environment / Steps to reproduce the issue
I used the prebuilt binaries v2.0.18 from the mingw repo.
I used basic-1.c and the following build command for testing.
I have also tried to build libmosquitto from the master branch (15292b2) but I experienced the same issue. I used the following build command (as seen here):
I'm using CMake version 3.28.1.
I tried to build on the develop branch too, but it failed so I gave up trying. Therefore I don't know if any of the issues on the master branch are actually fixed on the develop branch.
The text was updated successfully, but these errors were encountered: