Results 1 to 5 of 5

Thread: Using DLL in qwt

  1. #1
    Join Date
    Feb 2011
    Posts
    5
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Windows

    Default Using DLL in qwt

    Hello

    I'm trying to create an import library for qwt but I only got a .dll because I don´t have a the headers files __declspec definitions (implicit use of .dll's). Is there any way to create a .dll without changing the header files?
    Thank you very much!

    All the best

    Ricardo Sousa

  2. #2
    Join Date
    Mar 2010
    Posts
    319
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1
    Thanked 14 Times in 12 Posts

    Default Re: Using DLL in qwt

    I am not sure I am getting your problem right, but just in case: have you tried to link with the -Wl,-enable-auto-import option?

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: Using DLL in qwt

    Quote Originally Posted by RicardoSousa View Post
    I'm trying to create an import library for qwt but I only got a .dll

    [...]

    Is there any way to create a .dll without changing the header files?
    Ok, I'm confused.

    Do you mean import library? If so, if you have the specifications for the DLL (functions, parameter types), then yes, otherwise no.

    Thats if I even understand your question, which I probably don't.

  4. #4
    Join Date
    Feb 2011
    Posts
    5
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    Windows

    Default Re: Using DLL in qwt

    I´m sorry about that...

    Yes, I'm trying to build an application dynamically (it uses .dll files). This application uses qwt functions so I had to build its dll´s.
    But I didn´t get the import library... only a DLL file.

    I know that I have to add __declspec prefix to DLL functions in the header file, but this would take to much time to do it.
    So i'm wondering if there is another option.

    Thank you very much for your answers!

    All the best

    Ricardo Sousa

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Using DLL in qwt

    I built and installed a default Qwt on Windows and ended up with a dynamic library (qwt5.dll) and a matching import library (libqwt5.a). Not sure why you have not got the same (or MSVC equivalents).

    You should only have to add the Qwt library directory and library name to your PRO file LIBS variable:
    Qt Code:
    1. LIBS += -LC:/Qwt-5.2.1/lib -lqwt5
    To copy to clipboard, switch view to plain text mode 
    or the like and qmake looks after the rest.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.