[Insight-users] Compiling errors in ITK source from CD-ROM and CVS repository.

Luis Ibanez luis.ibanez at kitware.com
Mon, 26 Apr 2004 22:04:05 -0400


Hi Yang,

You are mixing code between the version of the CVS
repository and the version in the CD-ROM (ITK 1.6).

I looks like at configuration time you are giving
both of them the same binary directory as target
in CMake.


Please do the following:

1) Erase the binary directories that you are using
    for building ITK. Restart configuring from
    scratch. Take one binary directory for building
    the CVS version and another independent binary
    directory for building ITK version 1.6.

2) Do you want to get Tcl wrapping ?
    If so, it is advisable to first build ITK
    without wrapping, and only when you are done,
    rerun CMake, enable the wrapping and do a
    second build.

3) If you want to use wrapping, it is better
    for you to build ITK in Release mode. There
    can easily be a factor of 10 in performance
    when you pass from Release mode to Debug mode.



A little bit of order in your disk will help
prevent such painful process.



Regards,


   Luis



-------------------
Yang Wang wrote:

> Hi, Luis
> 
> When I try to compile ITK from source code in the CD-ROM with Visual 
> Studio .NET,
> I have the following result:
> 
> ---------------------- Done ----------------------
> 
>    Build: 222 succeeded, 1 failed, 0 skipped
> 
> The errors comes from the following:
> 
> ------ Build started: Project: ITKCommonTcl, Configuration: Debug Win32 
> ------
> 
> Compiling...
> wrap_ITKCommonBaseTcl.cxx
> wrap_ITKCommonBaseTcl.cxx(1218) : error C2660: 'itk::LightObject::Print' 
> : function does not take 2 arguments
> wrap_ITKCommonBaseTcl.cxx(2892) : error C2039: 
> 'GetReleaseDataBeforeUpdateFlag' : is not a member of 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> wrap_ITKCommonBaseTcl.cxx(2919) : error C2662: 
> 'itk::ProcessObject::GetReleaseDataFlag' : cannot convert 'this' pointer 
> from 'const itk::ProcessObject' to 'itk::ProcessObject &'
>        Conversion loses qualifiers
> wrap_ITKCommonBaseTcl.cxx(2977) : error C2248: 
> 'itk::ProcessObject::PrepareOutputs' : cannot access protected member 
> declared in class 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(283) : see declaration of 
> 'itk::ProcessObject::PrepareOutputs'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> wrap_ITKCommonBaseTcl.cxx(3031) : error C2039: 
> 'ReleaseDataBeforeUpdateFlagOff' : is not a member of 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> wrap_ITKCommonBaseTcl.cxx(3057) : error C2039: 
> 'ReleaseDataBeforeUpdateFlagOn' : is not a member of 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> wrap_ITKCommonBaseTcl.cxx(3249) : error C2039: 
> 'SetReleaseDataBeforeUpdateFlag' : is not a member of 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> wrap_ITKCommonBaseTcl.cxx(6403) : error C2039: 'GetUpdateMTime' : is not 
> a member of 'itk::DataObject'
>        d:\ITK\Code\Common\itkDataObject.h(135) : see declaration of 
> 'itk::DataObject'
> wrap_ITKCommonBaseTcl.cxx(7798) : error C2662: 
> 'itk::DataObject::GetReleaseDataFlag' : cannot convert 'this' pointer 
> from 'const itk::DataObject' to 'itk::DataObject &'
>        Conversion loses qualifiers
> wrap_ITKCommonBaseTcl.cxx(7883) : error C2039: 'GetUpdateMTime' : is not 
> a member of 'itk::DataObject'
>        d:\ITK\Code\Common\itkDataObject.h(135) : see declaration of 
> 'itk::DataObject'
> wrap_ITKCommonBaseTcl.cxx(9050) : error C2039: 
> 'GetReleaseDataBeforeUpdateFlag' : is not a member of 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> wrap_ITKCommonBaseTcl.cxx(9135) : error C2248: 
> 'itk::ProcessObject::PrepareOutputs' : cannot access protected member 
> declared in class 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(283) : see declaration of 
> 'itk::ProcessObject::PrepareOutputs'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> wrap_ITKCommonBaseTcl.cxx(9189) : error C2039: 
> 'ReleaseDataBeforeUpdateFlagOff' : is not a member of 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> wrap_ITKCommonBaseTcl.cxx(9215) : error C2039: 
> 'ReleaseDataBeforeUpdateFlagOn' : is not a member of 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> wrap_ITKCommonBaseTcl.cxx(9407) : error C2039: 
> 'SetReleaseDataBeforeUpdateFlag' : is not a member of 'itk::ProcessObject'
>        D:\ITK\Code\Common\itkProcessObject.h(78) : see declaration of 
> 'itk::ProcessObject'
> 
> Build log was saved at 
> "file://d:\ITKbin\Wrapping\CSwig\Common\Debug\BuildLog.htm"
> ITKCommonTcl - 15 error(s), 0 warning(s)
> 
> However, even it get errors like these, I still can run examples from 
> the ITK Example direcotory.
> Can you tell me what is going wrong?
> 
> Plus, I get a strange thing happeded today. When I try to compile 
> \Insight that checkout from CVS repository,
> it constantly showed error messages, almost in every project, and I have 
> to manually terminate it.
> But for the code that I copy from the Disc, only one (the above) got 
> error messages. Don't know why?
> 
> Thanks for any help.
> 
> Yours,
> Casper
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>