Qt uses dynamic libraries



Source: WeChat Official Account "Programming Learning Base"

In the previous section, we talked about the encapsulation of the C++ library. How to call the encapsulated library?

不同的编译器封装的库只能被该编译器调用,也就是MSVC编译出来的库只能被MSVC编译器调用,MinGW调用不了,同时还要区分32位和64位

Next, take the library compiled by MSVC as an example:

QT use library

Prepare library directory

First, put the libraries compiled by Debug and Release into a folder, the file structure is as follows

├─bin
│ dllDemo.dll
│ dllDemod.dll

├─include
│ dlldemo.h
│ dlld

Guess you like

Origin blog.csdn.net/qq_44519484/article/details/108687306