Using a custom dll in a Qt application

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 dlls in Qt. I created a file *.dll

using Qt Creator called Shared1.dll

which only contains an empty class named Shared1

. Now I would like to use the class Shared1

in another Qt project. How can i do this?

Thanks in advance.

+2


a source to share


1 answer


Use your Pro file to include header and library files.

For header files:

INCLUDEPATH += "C:\Source\HeaderFiles"

      

For libraries:



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

      

Include these header files when using functions from libraries.

This works for me ... Try ..

+1


a source







All Articles