windows+Qt+MSVC+Mingw+dll

1、MSVC编译的库是xxx.dll和xxx.lib,MingW编译的库是libxxx.dll和libxxx.dll.a

其中lib文件和.a文件一般都是对dll的引导;或者是包含了所有的源码,作用和dll一样

2、Qt调用msvc的dll

INCLUDEPATH += C:/Users/Administrator/Desktop/new/CTK-master/build_msvc2017/CTK-build/Libs/PluginFramework
INCLUDEPATH += C:/Users/Administrator/Desktop/new/CTK-master/build_msvc2017/CTK-build/Libs/Core

LIBS += -LC:/Users/Administrator/Desktop/new/CTK-master/build_msvc2017/CTK-build/bin/Debug -lCTKCore -lCTKPluginFramework

INCLUDEPATH +是头文件路径

LIBS +是lib库路径,这个路径下需要同时有dll和lib文件

3、Qt调用mingw的dll

INCLUDEPATH += C:/Users/Administrator/Desktop/new/CTK-master/build_mingw64/CTK-build/Libs/PluginFramework
INCLUDEPATH += C:/Users/Administrator/Desktop/new/CTK-master/build_mingw64/CTK-build/Libs/Core

LIBS += -LC:/Users/Administrator/Desktop/new/CTK-master/build_mingw64/CTK-build/bin/ -llibCTKCore
LIBS += -LC:/Users/Administrator/Desktop/new/CTK-master/build_mingw64/CTK-build/bin/ -llibCTKPluginFramework

LIBS += C:/Users/Administrator/Desktop/new/CTK-master/build_mingw64/CTK-build/bin/libCTKCore.dll.a
LIBS += C:/Users/Administrator/Desktop/new/CTK-master/build_mingw64/CTK-build/bin/libCTKPluginFramework.dll.a

 



posted @ 2020-06-30 19:05  朱小勇  阅读(793)  评论(0编辑  收藏  举报