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

WITH_STATIC_LIBRARIES does not work on Windows using CMAKE #1369

Closed
TimmvonderMehden opened this issue Aug 2, 2019 · 0 comments

Comments

@TimmvonderMehden
Copy link

commented Aug 2, 2019

i tried the recent v1.6.4 to compile with WITH_STATIC_LIBRARIES=ON using CMake and VisualStudio 2017. The problem seems to be that some of the projects accidentially use the dll-version of the lib although expecting the static version (or maybe vice versa...) . The problem is there since at least 1.6.2 but propably older....

the static lib is build, but 5 projects (mosquitto_pub/sub,mosquitto_rr,...) fail to link, some of the linker errors from my cmake / vs2017 build log:

pub_client.obj : error LNK2019: unresolved external symbol __imp_mosquitto_lib_version referenced in function print_usage [C:\dev\tmp\cmake\mosquitto\VS2017_64\client\mosquitto_pub.vcxproj]

...\client_props.c(176): warning C4267: 'function': conversion from 'size_t' to 'uint16_t', possible loss of data [C:\dev\tmp\cmake\mosquitto\VS2017_64\client\mosquitto_rr.vcxproj]
client_shared.c

sub_client.obj : error LNK2019: unresolved external symbol __imp_mosquitto_lib_version referenced in function print_usage [C:\dev\tmp\cmake\mosquitto\VS2017_64\client\mosquitto_sub.vcxproj]

btw,. WITH_STATIC_LIBRARIES=OFF compiles without problems in Release,Debug,64,32 bit...!

ralight added a commit that referenced this issue Aug 6, 2019
Closes #1369. Thanks to TimmvonderMehden
@ralight ralight added this to the 1.6.5 milestone Aug 29, 2019
@ralight ralight closed this Aug 29, 2019
ralight added a commit that referenced this issue Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.