Hi Tuomas,
I've tried to build the Qt examples on my Windows system, and I cannot reproduce your issue.
However, I don't have the exact same environment as you, as I've relied on MSYS (minimal system) on
top of MinGW. Actually, I need MSYS for my "regular" (non-PLplot) job and I didn't want
to break it (I believe the MinGW and MSYS "make" executables conflict). In a nutshell, I
built everything with:
- MinGW 5.1.4
- MSYS 1.0.11
- Qt 2009.03 (4.5.1 I believe)
- cmake 2.6.4
I've built everything from the MSYS environment, and I've had to create my own
build scripts for the examples, as the generated ones didn't work (now that I
think of it, I may not have pkg-config). I'm far from understanding everything
in the PLplot build process, and as it was straightforward I didn't bother much.
So I believe there is nothing wrong (for this issue!) in the Qt driver. I don't
see why the executables and dlls generated under MinGW/cmd and MinGW/MSYS would
be different. So, I suppose that the issue is in the build process, but as I
told you, I don't understand it well enough to be able to help you.
Anyway, I will follow the discussion about this issue and I will try to help if
I believe I can.
Alban
On Aug 28, 2009, at 3:11 PM, Tuomas Seppälä wrote:
Thanks for the tips. -DENABLY_DYNDRIVERS=OFF solved the problem.
I also tried to compile the sources with MinGW but got "the procedure
entry point _Z13qFlagLocationPKc could not be located in the dynamic
link library QtCore4.dll" error at the same place where nmake
failed. If
I have understood correctly, this shouldn't happen because I only have
one Qt version installed, but if you have an idea why this happens,
please enlighten me.
AFAIR, are there different versions of QT to download for the
compilers, i.e. there is a "binary" version of Qt for Mingw and for
Visual C++ you need the QT source and need to compile it yourself, or?
Are you sure you link to the correct QT version? This doesn't explain
why both fail, but for MinGW I was successful to compile plplot qt
drivers with the MinGW QT version.
Also, for some reason the qt_example only works when I build it in
debug
mode. Is this normal? If I run the release build, I get "Debug error!
QWidget: Must construct a QApplication before a QPaintDevice" error. I
did a little googling and found out that people have encountered this
problem when porting Qt code from another platform, so could this be
the
problem here, too?
This is certainly a bug, maybe an uninitialized variable. I'm not much
into QT, but on the CC: is Alban Rochel, the qt driver developer, who
might be able help you. I don't have everything setup up on my virtual
Windows machine right now, so I'm not of much help in the moment
either. After I set up the Qt environment I'll have a look into this
as well - but not in the next days.
HTH,
Werner