PDA

View Full Version : Trying to use QWT plugins in Designer



AwareWolf
12th January 2010, 16:37
This is probably a problem experienced and solved a million times already, but I haven't been able to find a thread that has helped yet, so here I go:

I am trying to use QWT for the first time. I have Qt 4.6.0, and QWT 5.2.0, on Windows XP. I downloaded QWT and built "qwt" and "qwt_designer_plugin" using Visual Studio 2008. I then copied qwt_designer_plugin5.dll .exp and .lib into my <QTDIR>\plugins\designer directory. (I don't know if the .exp is really needed). Upon opening Qt Designer, the QWT plugins are not available, and under Plugin Information, the qwt_designer_plugin5.dll is under the Faild Plugins with this error:

Cannot load library C:/Qt/4.60/plugins/designer/qwt_designer_plugin5.dll: The specified module could not be found.

I tried moving .dlls into the <QTDIR>\plugins\designer directory as needed to make the qwt_designer_plugin5.dll "happy" in dependency walker, but this didn't change anything.

Any help you can give would be much appreciated!

AwareWolf
12th January 2010, 19:48
Never mind, it's now working. I copied the qwt5.lib file to <QTDIR>\lib and the qwt5.dll file to <QTDIR>\bin. All is well.

AwareWolf
13th January 2010, 13:04
OK, all is NOT well.

In designer I was able to drag a qwtplot onto my application. Then, in Visual Studio I tried to build my application, and I am getting a linker error:

4>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

I am building QWT5 and the plugin using the /SUBSYSTEM:CONSOLE switch, as I read on a thread here I am supposed to do. I also tried /SUBSYSTEM:WINDOWS; same result.

Any ideas?

AwareWolf
13th January 2010, 14:17
Hmmm... this is turning into an excercise in talking to myself as a progress from problem to problem.:)

I no longer have the linker error, although the solution was not very satisfying. I simply removed the qwtPlot from my form file, and reverted to the latest working project file, confirmed that I could build, and added in the changes one at a time. This worked; I now have a qwtPlot in my form, and I can build just fine. Apparently there was something funky about my project settings, but I don't know what.

However, things are still not good: I can't debug my app. When I try, the program just closes when I get to the line:

qwtPlot = new QwtPlot(PageService);

The app runs fine in Release mode. I suspect I need to build the qwt binaries in debug mode, so I am going to try that. I had thought that a release mode build would be fine, as long as I didn't want to step into the qwt code, but maybe I'm wrong about that. I will post another response to myself when I have some news.:rolleyes:

AwareWolf
13th January 2010, 14:42
Yup, that was it. I am now building and running my app with a qwtPlot that is just sitting there doing nothing. Everything is going to run smoothly from here, I can tell.

I want to thank me for all my help, and I hope I can reciprocate someday.:)