Using custom dll in Qt Application

10,727

Use your Pro file to include your header files and libraries..

For Header Files:

INCLUDEPATH += "C:\Source\HeaderFiles"

For libraries:

LIBS += "C:\Source\Libraries\MyLib.lib"

Include those header files while using the functions from the libraries.

This works for me... Try it..

Share:
10,727
Donotalo
Author by

Donotalo

Yet to be discovered.

Updated on June 13, 2022

Comments

  • Donotalo
    Donotalo almost 2 years

    First, my compiler and OS:

    • Qt Creator 1.3
    • Qt 4.6 (32 bit)
    • Windows 7 Ultimate

    I want to learn how to create and import a dll in Qt. I've created a *.dll file using Qt Creator, called Shared1.dll which contains nothing but an empty class named Shared1. Now I'd like to use Shared1 class in another Qt project. How can I do that?

    Thanks in advance.