[Dcmlib] gdcm(python) build error on Windows

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Jun 27 13:09:55 CEST 2007


On 6/27/07, Charl P. Botha <cpbotha at cpbotha.net> wrote:
> Hi there Mathieu, good to run into you here (although I was expecting it ;)
>
> Jean-Pierre, pleased to meet you too!
>
> On 6/27/07, Mathieu Malaterre <mathieu.malaterre at gmail.com> wrote:
> >   Welcome to GDCM ! Well apparently welcome is pretty harsh
> >   I am trying to compile gdcmPython with swig 1.3.29 on cygwin and
> > except the char* to const char* conversion everything seems to go
> > smoothly.
>
> To get it to compile, I've commented out the NewPrivate() declaration
> in gdcmDicomDirSerie.  At least now it seems to build. :)  (i couldn't
> find a definition for NewPrivate anywhere...)

$ cvs annotate gdcmDicomDirSerie.cxx
...
1.42         (jpr      23-May-07): DicomDirPrivate *DicomDirSerie::NewPrivate()
1.42         (jpr      23-May-07): {
1.42         (jpr      23-May-07):    DicomDirPrivate *dd =
DicomDirPrivate::New();
1.42         (jpr      23-May-07):    Privates.push_back(dd);
1.42         (jpr      23-May-07):    return dd;
1.42         (jpr      23-May-07): }
...

> I have an out of source build.  The install is not complete w.r.t.
> Python... gdcm.py and friends are not copied to the installation dir
> after a make install.  After copying gdcmPython dir manually from
> build-dir to install dir solved this problem.  I can now  import
> everything.

Yeah I have to admit, I was too lazy to look into distutil to create a
nice install. Installation of python stuff is pretty bad, but not to
point figure at other people, cmake support for that is also pretty
bad...

> Mathieu, thanks for checking with VSExpress.  It's probably the
> combination of VS 7.1 and swig 1.3.31 at my end.  Commenting out
> NewPrivate() works around this.
>
> Next problem is building with GDCM_VTK ON.   During CMake (with VTK
> paraview 3-0 branch) it gives:
>
> ---------------------------
> Error
> ---------------------------
> CMake Error: Error in cmake code at
> c:/build/gdcm/gdcmPython/CMakeLists.txt:71:
> Unknown CMake command "VTK_WRAP_PYTHON2".
>
> (Press  Cancel to suppress any further messages.)
> ---------------------------
> OK   Cancel
> ---------------------------
>
> Funny.  I'm going to try to track this down.

Rings also a bell. I think Ken Martin yanked the old macros when using
CMake 2.4, to replace them with a warning or something like that. I
bet if you just replace the 2 with 3 you should be all set (I think
API is the same).

good luck !


-- 
Mathieu



More information about the Dcmlib mailing list