Giter Site home page Giter Site logo

windows平台,编译选项打开mqtt,但编译出来的hv-static.lib库用dumpbin查看符号表,看不到mqtt的c语言版本的函数实现 about libhv HOT 7 CLOSED

ThomasVon2021 avatar ThomasVon2021 commented on May 20, 2024
windows平台,编译选项打开mqtt,但编译出来的hv-static.lib库用dumpbin查看符号表,看不到mqtt的c语言版本的函数实现

from libhv.

Comments (7)

ithewei avatar ithewei commented on May 20, 2024

你图里打印的External | mqtt_client_new,不就是mqtt的c接口吗

from libhv.

ThomasVon2021 avatar ThomasVon2021 commented on May 20, 2024

External 表示在这个静态库里只有申明,没有实现,连接的时候会报找不到实现

from libhv.

ithewei avatar ithewei commented on May 20, 2024

windows下链接libhv静态库,需要加HV_STATICLIB预编译宏,这个你加了吗

from libhv.

ThomasVon2021 avatar ThomasVon2021 commented on May 20, 2024

是指我在其它项目里用静态库连接的时候,也要加HV_STATICLIB宏,而不是在libhv编译静态库的时候?libhv的cmakelists我看是有此定义的:

if(BUILD_STATIC)
    add_library(hv_static STATIC ${LIBHV_SRCS})
    target_compile_definitions(hv_static PUBLIC HV_STATICLIB)
    target_include_directories(hv_static PRIVATE ${LIBHV_SRCDIRS}
        INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
    target_link_libraries(hv_static ${LIBS})
    install(TARGETS hv_static
        EXPORT libhvConfig
        ARCHIVE DESTINATION lib)
    add_custom_target(libhv_static DEPENDS hv_static)
endif()

from libhv.

ithewei avatar ithewei commented on May 20, 2024

是的,使用的项目里需要加,见FAQ:https://github.com/ithewei/libhv/wiki/%E4%B8%AD%E6%96%87FAQ#qwindows%E4%B8%8B%E9%93%BE%E6%8E%A5%E4%B8%8D%E8%BF%87

from libhv.

ThomasVon2021 avatar ThomasVon2021 commented on May 20, 2024

今天确认后给你回复,谢谢

from libhv.

ThomasVon2021 avatar ThomasVon2021 commented on May 20, 2024

ok了,谢谢

from libhv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.