[ITK Community] [Insight-users] compilation error

Laforest, Richard laforestr at mir.wustl.edu
Mon Dec 2 16:41:24 EST 2013


Thanks.

Pretty much any of them.
I was trying ImageRegistration project and the project is defined to compile all examples within the 'Registration' example folder.
This is a copy of the CMakeLists.txt file.

Richard








project(ImageRegistration)
include_regular_expression("^.*$")

add_executable(ImageRegistration3 ImageRegistration3.cxx )
target_link_libraries(ImageRegistration3 ${ITK_LIBRARIES})

add_executable(ImageRegistration5 ImageRegistration5.cxx )
target_link_libraries(ImageRegistration5 ${ITK_LIBRARIES})

add_executable(ImageRegistration6 ImageRegistration6.cxx )
target_link_libraries(ImageRegistration6 ${ITK_LIBRARIES})

add_executable(ImageRegistration8 ImageRegistration8.cxx )
target_link_libraries(ImageRegistration8 ${ITK_LIBRARIES})

add_executable(ImageRegistration9 ImageRegistration9.cxx )
target_link_libraries(ImageRegistration9 ${ITK_LIBRARIES})

add_executable(ImageRegistration10 ImageRegistration10.cxx )
target_link_libraries(ImageRegistration10 ${ITK_LIBRARIES})

add_executable(DeformableRegistration4 DeformableRegistration4.cxx )
target_link_libraries(DeformableRegistration4 ${ITK_LIBRARIES})

add_executable(ImageRegistration4 ImageRegistration4.cxx )
target_link_libraries(ImageRegistration4 ${ITK_LIBRARIES})

add_executable(ImageRegistration7 ImageRegistration7.cxx )
target_link_libraries(ImageRegistration7 ${ITK_LIBRARIES})

add_executable(ImageRegistration11 ImageRegistration11.cxx )
target_link_libraries(ImageRegistration11 ${ITK_LIBRARIES})

add_executable(ImageRegistration12 ImageRegistration12.cxx )
target_link_libraries(ImageRegistration12 ${ITK_LIBRARIES})

add_executable(ImageRegistration13 ImageRegistration13.cxx )
target_link_libraries(ImageRegistration13 ${ITK_LIBRARIES})

add_executable(ImageRegistration14 ImageRegistration14.cxx )
target_link_libraries(ImageRegistration14 ${ITK_LIBRARIES})

add_executable(ImageRegistration15 ImageRegistration15.cxx )
target_link_libraries(ImageRegistration15 ${ITK_LIBRARIES})

add_executable(ImageRegistration16 ImageRegistration16.cxx )
target_link_libraries(ImageRegistration16 ${ITK_LIBRARIES})

add_executable(ImageRegistration18 ImageRegistration18.cxx )
target_link_libraries(ImageRegistration18 ${ITK_LIBRARIES})

add_executable(ImageRegistration19 ImageRegistration19.cxx )
target_link_libraries(ImageRegistration19 ${ITK_LIBRARIES})

add_executable(ImageRegistration20 ImageRegistration20.cxx )
target_link_libraries(ImageRegistration20 ${ITK_LIBRARIES})

add_executable(DeformableRegistration6 DeformableRegistration6.cxx )
target_link_libraries(DeformableRegistration6 ${ITK_LIBRARIES})

add_executable(DeformableRegistration7 DeformableRegistration7.cxx )
target_link_libraries(DeformableRegistration7 ${ITK_LIBRARIES})

add_executable(DeformableRegistration8 DeformableRegistration8.cxx )
target_link_libraries(DeformableRegistration8 ${ITK_LIBRARIES})

if( ITK_USE_FFTWD )
  add_executable(DeformableRegistration9 DeformableRegistration9.cxx )
  target_link_libraries(DeformableRegistration9 ${ITK_LIBRARIES})

  add_executable(DeformableRegistration10 DeformableRegistration10.cxx )
  target_link_libraries(DeformableRegistration10 ${ITK_LIBRARIES})
endif()

add_executable(MultiResImageRegistration1 MultiResImageRegistration1.cxx )
target_link_libraries(MultiResImageRegistration1 ${ITK_LIBRARIES})

add_executable(MultiResImageRegistration2 MultiResImageRegistration2.cxx )
target_link_libraries(MultiResImageRegistration2 ${ITK_LIBRARIES})

add_executable(MultiResImageRegistration3 MultiResImageRegistration3.cxx )
target_link_libraries(MultiResImageRegistration3 ${ITK_LIBRARIES})

add_executable(DeformableRegistration1 DeformableRegistration1.cxx )
target_link_libraries(DeformableRegistration1 ${ITK_LIBRARIES})

add_executable(DeformableRegistration11 DeformableRegistration11.cxx )
target_link_libraries(DeformableRegistration11 ${ITK_LIBRARIES})

add_executable(DeformableRegistration2 DeformableRegistration2.cxx )
target_link_libraries(DeformableRegistration2 ${ITK_LIBRARIES})

add_executable(DeformableRegistration3 DeformableRegistration3.cxx )
target_link_libraries(DeformableRegistration3 ${ITK_LIBRARIES})

add_executable(DeformableRegistration5 DeformableRegistration5.cxx )
target_link_libraries(DeformableRegistration5 ${ITK_LIBRARIES})

add_executable(DeformableRegistration12 DeformableRegistration12.cxx )
target_link_libraries(DeformableRegistration12 ${ITK_LIBRARIES})

add_executable(DeformableRegistration13 DeformableRegistration13.cxx )
target_link_libraries(DeformableRegistration13 ${ITK_LIBRARIES})

add_executable(DeformableRegistration14 DeformableRegistration14.cxx )
target_link_libraries(DeformableRegistration14 ${ITK_LIBRARIES})

add_executable(ChangeInformationImageFilter ChangeInformationImageFilter.cxx )
target_link_libraries(ChangeInformationImageFilter ${ITK_LIBRARIES})

add_executable(DeformableRegistration15 DeformableRegistration15.cxx )
target_link_libraries(DeformableRegistration15 ${ITK_LIBRARIES})

add_executable(DeformableRegistration16 DeformableRegistration16.cxx )
target_link_libraries(DeformableRegistration16 ${ITK_LIBRARIES})

add_executable(DeformableRegistration17 DeformableRegistration17.cxx )
target_link_libraries(DeformableRegistration17 ${ITK_LIBRARIES})

add_executable(DisplacementFieldInitialization DisplacementFieldInitialization.cxx )
target_link_libraries(DisplacementFieldInitialization ${ITK_LIBRARIES})

add_executable(LandmarkWarping2 LandmarkWarping2.cxx )
target_link_libraries(LandmarkWarping2 ${ITK_LIBRARIES})

add_executable(BSplineWarping1 BSplineWarping1.cxx )
target_link_libraries(BSplineWarping1 ${ITK_LIBRARIES})

add_executable(BSplineWarping2 BSplineWarping2.cxx )
target_link_libraries(BSplineWarping2 ${ITK_LIBRARIES})

add_executable(ThinPlateSplineWarp ThinPlateSplineWarp.cxx )
target_link_libraries(ThinPlateSplineWarp ${ITK_LIBRARIES})

add_executable(ModelToImageRegistration1 ModelToImageRegistration1.cxx )
target_link_libraries(ModelToImageRegistration1 ${ITK_LIBRARIES})

add_executable(ModelToImageRegistration2 ModelToImageRegistration2.cxx )
target_link_libraries(ModelToImageRegistration2 ${ITK_LIBRARIES})

add_executable(ImageRegistration1 ImageRegistration1.cxx )
target_link_libraries(ImageRegistration1 ${ITK_LIBRARIES})

add_executable(ImageRegistration2 ImageRegistration2.cxx )
target_link_libraries(ImageRegistration2 ${ITK_LIBRARIES})

add_executable(ImageRegistration17 ImageRegistration17.cxx )
target_link_libraries(ImageRegistration17 ${ITK_LIBRARIES})

#TODO needs updating to new statistics  add_executable(ImageRegistrationHistogramPlotter ImageRegistrationHistogramPlotter.cxx )
#TODO needs updating to new statistics  target_link_libraries(ImageRegistrationHistogramPlotter ${ITK_LIBRARIES})

add_executable(MeanSquaresImageMetric1  MeanSquaresImageMetric1.cxx )
target_link_libraries(MeanSquaresImageMetric1 ${ITK_LIBRARIES})

if(ITKV3_COMPATIBILITY)
  add_executable(DeformationFieldJacobian DeformationFieldJacobian.cxx )
  target_link_libraries(DeformationFieldJacobian ${ITK_LIBRARIES})
endif()

add_executable(IterativeClosestPoint1   IterativeClosestPoint1.cxx )
target_link_libraries(IterativeClosestPoint1 ${ITK_LIBRARIES})

add_executable(IterativeClosestPoint2   IterativeClosestPoint2.cxx )
target_link_libraries(IterativeClosestPoint2 ${ITK_LIBRARIES})

add_executable(IterativeClosestPoint3   IterativeClosestPoint3.cxx )
target_link_libraries(IterativeClosestPoint3 ${ITK_LIBRARIES})

if(BUILD_TESTING)
  add_subdirectory(test)
endif()





-----Original Message-----
From: Bill Lorensen [mailto:bill.lorensen at gmail.com]
Sent: Monday, December 02, 2013 3:07 PM
To: Laforest, Richard
Cc: insight-users at itk.org
Subject: Re: [Insight-users] compilation error

What example? And what does your CMakeLists.txt file look like?


On Mon, Dec 2, 2013 at 2:32 PM, Laforest, Richard
<laforestr at mir.wustl.edu> wrote:
>
>
> Hello All,
>
>
>
> I just downloaded the itk code and I went thought the configuration without
> problems with cmake.
>
> I am using a Windows computer with Code::Blocks (version12.11) with MinGW
> compiler.
>
> I am now trying to compile an example and I get the following error message
> something like 72% through the compilation.
>
> I would appreciate any help on resolving this issue.
>
> Many thanks!
>
>
>
>
>
>
>
> In file included from
> C:\ITK\InsightToolkit-4.4.2\Modules\ThirdParty\DICOMParser\src\DICOMParser\DICOMFile.cxx:29:0:
>
> C:\ITK\InsightToolkit-4.4.2\Modules\ThirdParty\DICOMParser\src\DICOMParser\DICOMFile.h:51:28:
> error: 'string' in namespace '::' does not name a type
>
> C:\ITK\InsightToolkit-4.4.2\Modules\ThirdParty\DICOMParser\src\DICOMParser\DICOMFile.h:51:38:
> error: ISO C++ forbids declaration of 'filename' with no type [-fpermissive]
>
> C:\ITK\InsightToolkit-4.4.2\Modules\ThirdParty\DICOMParser\src\DICOMParser\DICOMFile.cxx:61:37:
> error: 'string' in namespace '::' does not name a type
>
> C:\ITK\InsightToolkit-4.4.2\Modules\ThirdParty\DICOMParser\src\DICOMParser\DICOMFile.cxx:61:47:
> error: ISO C++ forbids declaration of 'filename' with no type [-fpermissive]
>
> C:\ITK\InsightToolkit-4.4.2\Modules\ThirdParty\DICOMParser\src\DICOMParser\DICOMFile.cxx:
> In member function 'bool itkdicomparser::DICOMFile::Open(const int&)':
>
> C:\ITK\InsightToolkit-4.4.2\Modules\ThirdParty\DICOMParser\src\DICOMParser\DICOMFile.cxx:64:29:
> error: request for member 'c_str' in 'filename', which is of non-class type
> 'const int'
>
> mingw32-make.exe[2]: ***
> [Modules/ThirdParty/DICOMParser/src/DICOMParser/CMakeFiles/ITKDICOMParser.dir/DICOMFile.cxx.obj]
> Error 1
>
>
>
>
>
>
>
> Richard Laforest, Ph.D.
>
> Mallinckrodt Institute of Radiology, Box 8225
>
> Washington University Medical School
>
> 510 Kingshighway South - St.Louis, Missouri - 63110
>
> Tel: 314-362-8423 | Fax: 314-362-5428 | laforestr at wustl.edu
>
>
>
>
>
>
>
> Richard Laforest, Ph.D.  |  Associate Professor of Radiology
>
>
>
> Mallinckrodt Institute of Radiology, Box 8225
>
> Washington University Medical School
>
> 510 Kingshighway South - St.Louis, Missouri - 63110
>
> Tel: 314-362-8423 | Fax: 314-362-5428 | laforestr at wustl.edu
>
>
>
>
> ________________________________
>
> The material in this message is private and may contain Protected Healthcare
> Information (PHI). If you are not the intended recipient, be advised that
> any unauthorized use, disclosure, copying or the taking of any action in
> reliance on the contents of this information is strictly prohibited. If you
> have received this email in error, please immediately notify the sender via
> telephone or return mail.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>



--
Unpaid intern in BillsBasement at noware dot com

________________________________

The material in this message is private and may contain Protected Healthcare Information (PHI). If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users



More information about the Community mailing list