Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. qt5.12,qt5.8调用同一个vc的DLL一个失败,一个成功为什么??
Forum Updated to NodeBB v4.3 + New Features

qt5.12,qt5.8调用同一个vc的DLL一个失败,一个成功为什么??

Scheduled Pinned Locked Moved Unsolved Chinese
2 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mike zhou
    wrote on last edited by
    #1

    qt5.12,qt5.8调用同一个vc的DLL一个失败,一个成功为什么??

    代码如下,之前用5.8是可以的,现在用5.12 怎么就不行呢???

    typedef void(*lpFun)(void);

    QLibrary dll("myvcc.dll");
    
    if (dll.load()) {
        qDebug() << "load ok!";
    } else {
        qDebug() << "load failed!";
    }
    
    lpFun setBDDevParaDlg = (lpFun)dll.resolve("setDevParaDlg");
    
    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      yanniupai
      wrote on last edited by
      #2

      我也发现了这个问题,我的*.a库是使用mingw32-make编译的,为了兼容qt5.12.1,我还专门使用qt5.12.1的mingw32-make去重新编译了一遍*.a库,还是不行,使用5.11.3或以下版本都可以使用。

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved