PDA

View Full Version : Using DLL in qwt



RicardoSousa
7th February 2011, 17:36
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

agarny
7th February 2011, 17:56
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?

squidge
7th February 2011, 17:57
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.

RicardoSousa
7th February 2011, 18:35
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

ChrisW67
7th February 2011, 23:17
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:


LIBS += -LC:/Qwt-5.2.1/lib -lqwt5

or the like and qmake looks after the rest.