Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How do I use functions in a 3rd party .DLL file in Qt Creator on Windows?
Forum Updated to NodeBB v4.3 + New Features

How do I use functions in a 3rd party .DLL file in Qt Creator on Windows?

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 1.7k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    CodeGnome
    wrote on last edited by
    #1

    I've set the .DLL location in the windows environment variable path. I'm trying to do #Include <DLLname> which is not working. I'm very new, so sorry if this is a stupid question but thank you for any help!

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      I guess you would like to use the dll in an application you are working on?

      If you have access only to the dll and not the source, you need to have at least access to the interface. So, typically 3rd party dlls are coming as <3rd party>.dll with an additional lib <3rd party>.lib and a header file (<3rd party>.h). You need to include the header file in your application.

      You need to add the INCLUDEPATH to your .pro of the project. For example, when you have all stuff in one folder c:/bla/bli/3rdparty, you can add in the .pro
      @
      INCLUDEPATH += c:/bla/bli/3rdparty
      @

      When you have the header c:/bla/bli/3rdparty/3rdparty.h you can than use in your application:
      @
      #include "3rdparty.h"
      @

      You probably need also to set the LIBS parameter in .pro:
      @
      LIBS += -Lc:/bla/bli/3rdparty -l3rdparty.lib
      @
      when the lib is c:/bla/bli/3rdparty/3rdparty.lib.

      Vote the answer(s) that helped you to solve your issue(s)

      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