I have a project that works well on windows and linux and uses VTK
along
with DCMTK. I recently tried to port in to OS X and get the following
errors
from the DCMTK files. DCMTK had compiled and installed without
complaints.
My includes look as follows:
#ifdef _WIN32
#include "dcmtk/config/cfwin32.h"
#else
#include "dcmtk/config/cfunix.h"
#endif
#include "dcmtk/config/osconfig.h"
#include "dcmtk/ofstd/oftypes.h"
#include "dcmtk/dcmdata/dctk.h"
During compilation, I am getting the following error:
/usr/local/dicom/include/dcmtk/dcmdata/dcobject.h:251: error: expected
unqualified-id before 'do'
/usr/local/dicom/include/dcmtk/dcmdata/dcobject.h:251: error: expected
unqualified-id before 'while'
/usr/local/dicom/include/dcmtk/dcmdata/dcbytstr.h:198: error: expected
unqualified-id before 'do'
/usr/local/dicom/include/dcmtk/dcmdata/dcbytstr.h:198: error: expected
unqualified-id before 'while'
/usr/local/dicom/include/dcmtk/dcmdata/dcitem.h:208: error: expected
unqualified-id before 'do'
/usr/local/dicom/include/dcmtk/dcmdata/dcitem.h:208: error: expected
unqualified-id before 'while'
I checked these header files and it is always this declaration:
virtual OFCondition verify(const OFBool autocorrect = OFFalse );
I was wondering if anyone else has come across this problem and can
offer
some insight on how to solve it.
Many thanks.
Cheers,
Anja
First of all, questions concerning DCMTK should preferrably posted to the
DCMTK discussion forum at http://forum.dcmtk.org/
That said, my first guess would be that the MacOS X version you are using
(which one?) or one of the headers included prior to the DCMTK headers
might define a non-trivial macro named verify() in some header file
included before the DCMTK headers - if this is the case, then there
would be a problem indeed. See what happens if you rename the
method from verify() to, say, doVerify().
Including the DCMTK headers prior to those of all other non-system headers
might also be a good idea to try out.
Best regards,
Marco Eichelberg
OFFIS
Poster send question to dicom newsgroup and VTK mailing list for a
question related to dcmtk...pretty funny that reaction is exactly the
same
http://public.kitware.com/pipermail/vtkusers/2007-July/091734.html
-M
The funny thing is that the question was already answered in the DCMTK
forum: http://forum.dcmtk.org/viewtopic.php?p=4216#4216 :-)
Regards,
Joerg Riesmeier
cross posted to VTK mailing list to point to dicom newsgroup which
point to dcmtk forum :)
-Mathieu