[Insight-users] ITK Build Errors
Scott Johnson
Scott.Johnson at neuwave.com
Fri Sep 2 12:39:28 EDT 2011
Hello,
I have cloned a new copy of ITK from git and am running into errors trying to build it. I can build straight ITK fine, but get errors attempting to build the wrappers.
My environment:
Windows 7 64-bit
VC 2008
cmake Version 2.8.5
gccxml Version 0.9.0 (Packaged with CableSwig)
cswig Version 1.3.20
I've tracked the problem down to the execution of gccxml on several files. As an example I've picked the generation of itkMetaConverterBase.xml (but it happens with others as well). If I execute the same command in a cmd window I get the following output:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\System32>C:\development\ITK\CableSwigBinaries\bin\Release\gccxml.exe -fxml-start=_cable_ -fxml=C:/development/ITK/Binaries2/Wrapping/WrapITK/Libraries/ITKSpatialObjects/itkMetaConverterBase.xml --gccxml-gcc-options C:/development/ITK/Binaries2/Wrapping/WrapITK/Libraries/ITKSpatialObjects/gcc_xml.inc -DCSWIG-DCABLE_CONFIGURATION -DITK_MANUAL_INSTANTIATION C:/development/ITK/Binaries2/Wrapping/WrapITK/Libraries/ITKSpatialObjects/itkMetaConverterBase.cxx
In file included from C:/development/ITK/Binaries2/Wrapping/WrapITK/Libraries/ITKSpatialObjects/itkMetaConverterBase.cxx:21:
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:55: error: 'MetaObject' does not name a type
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:64: error: expected ',' or '...' before '*' token
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:64: error: ISO C++ forbids declaration of 'MetaObjectType' with no type
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:67: error: ISO C++ forbids declaration of 'MetaObjectType' with no type
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:67: error: 'MetaObjectType' declared as a 'virtual' field
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:67: error: expected ';' before '*' token
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:76: error: ISO C++ forbids declaration of 'MetaObjectType' with no type
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:76: error: 'MetaObjectType' declared as a 'virtual' field
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:76: error: expected ';' before '*' token
In file included from C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.h:86,
from C:/development/ITK/Binaries2/Wrapping/WrapITK/Libraries/ITKSpatialObjects/itkMetaConverterBase.cxx:21:
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx: In member function 'virtual typename itk::MetaConverterBase<VDimension>::SpatialObjectPointer itk::MetaConverterBase<VDimension>::ReadMeta(const char*)':
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx:33: error: 'MetaObjectType' was not declared in this scope
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx:33: error: 'mo' was not declared in this scope
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx: In member function 'virtual bool itk::MetaConverterBase<VDimension>::WriteMeta(const itk::SpatialObject<TDimension>*, const char*)':
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx:46: error: 'MetaObject' was not declared in this scope
C:/development/ITK/Trunk2/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx:46: error: 'mo' was not declared in this scope
The key problem seems to be that gccxml doesn't think that the MetaObject class has been defined. I've looked through gcc-xml.inc and it seems to have the proper paths to find metaobject.h. I'm not sure why gccxml can't find it or why it thinks MetaObject is not defined.
Does anyone have any advice on what is going wrong?
Thanks
-- Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110902/72d1bdce/attachment.htm>
More information about the Insight-users
mailing list