XIVN1987
V2EX  ›  C

undefined reference to '__imp_CreateBitmap'

  •  
  •   XIVN1987 · Oct 5, 2020 · 2836 views
    This topic created in 2067 days ago, the information mentioned may be changed or developed.

    编译 https://github.com/lvgl/lv_sim_codeblocks_win 报错 undefined reference to '__imp_CreateBitmap'

    搜了好久没找到解决方法,麻烦知道的大佬指点下,,谢谢

    这个项目页面上说用 CodeBlock 自带的 MinGW 编译,,我没有 CodeBlock,,用 tdm64-gcc 编译的,,不知道是不是这个原因导致的,,不过 tdm64-gcc 也是基于 MinGW 构建的

    2 replies    2020-10-06 00:32:51 +08:00
    irytu
        1
    irytu  
       Oct 5, 2020
    是不是什么库没 link 进来 比如 32 bit 的某些
    XIVN1987
        2
    XIVN1987  
    OP
       Oct 6, 2020
    终于解决了,,确实是没有连接 gdi32 导致的

    不过网上说的解决方案都是添加“-lgdi32”连接标志,,但我试了不管用

    必须通过 staticLibraries 指定它的完整路径才行,,我用的 qbs,,指定语法如下:
    cpp.staticLibraries: [
    FileInfo.path(cpp.compilerPath) + "/../x86_64-w64-mingw32/lib/libgdi32.a"
    ]

    搞不懂为什么会这样,,
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   934 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 178ms · UTC 19:50 · PVG 03:50 · LAX 12:50 · JFK 15:50
    ♥ Do have faith in what you're doing.