Text archives Help
- From: Ramón Casero Cañas <ramon.casero@comlab.ox.ac.uk>
- To: seg3d@sci.utah.edu
- Subject: [Seg3D] Re: Re: Seg3D incompatible with Qt?
- Date: Sun, 18 Oct 2009 21:20:13 +0100
Kristen Zygmunt wrote:
According to http://braincore.blogspot.com/2005_11_01_archive.html the
trouble is that both X11 and Qt define CursorShape. Since you are not
currently using Qt CursorShape, a workaround may be to make sure that
qwt_spline.h is #included before any X11-related #includes. This seems
a bit hacky and if is indeed the case, it's hard to understand why it
isn't seen by more people and why it hasn't been fixed by Qt. Qt and
X11 are supposed to be able to work together, so I don't think the
problem is due to combining them.
Hi Kris,
Your reply was incredibly useful, thanks. You are right, it's
CursorShape that was defined twice, once as a #define symbol (X11), once
as an enum (Qt).
The message you refer to offers another fix, that is to #undef
CursorShape. Both hacks are ugly, but this one seems easier to deal with.
So adding the following to SplineTool.cc solves that problem
<CODE>
#undef CursorShape
#include <Externals/qwt-5.2/src/qwt_spline.h>
</CODE>
Once this was solved, I run into another problem, because the build
system was not linking Qt to the Seg3D binary. Which means that my
latest patch was in fact broken.
After banging my head against the wall over the weekend, the solution
was pretty easy: One has to do
FIND_PACKAGE(Qt3 REQUIRED)
in the CMakeLists.txt at SCIRun.dev/src/ instead of
SCIRun.dev/src/Externals/qwt-5.2/, check that the Qt include files are
also installed (this is not checked by FIND_PACKAGE), include them in
the right places, and then link.
I made a new patch, and this one compiles and links the binary (at
least, it works for me)
http://www.paracommunications.org/wiki/codefiles/22091018-205500-add-external-qwt-library.diff
I haven't done anything with the spline class, other than declare a
variable with its type, so I don't know whether this approach will be
viable.
I have updated the list of milestones in
http://paracommunications.org/wiki/index.php?title=Adding_a_new_filter_to_Seg3D&action=edit§ion=22
Cheers,
Ramon.
--
Ramón Casero Cañas, DPhil
Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD
tlf +44 (0) 1865 610807
web
http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos
http://www.flickr.com/photos/rcasero/
Archive powered by MHonArc 2.6.16.