[Insight-developers] Compile errors in GPUCommon

Kris Zygmunt krismz at sci.utah.edu
Wed Jun 6 12:57:51 EDT 2012


Interesting!  It looks like itkGPUImageDataManager.h is both including  
itkGPUImage.h and providing a forward declaration of GPUImage, while  
GPUImage needs to include itkGPUImageDataManager.h.  Thus, removing  
the #include "itkGPUImage.h" from itkGPUImageDataManager.h in addition  
to your change should get it to compile (or at least it worked for me).
-Kris


On Jun 6, 2012, at 10:24 AM, Bill Lorensen wrote:

> The following code does not compile:
>
> #include "itkGPUImageDataManager.h"
> #include <cstdlib>
>
> int main ( int , char* [] )
> {
>
>  return EXIT_SUCCESS;
> }
>
>
> ------------------
> I thought I could fix it, but seems like the C++ is above my pay  
> grade.
>
> I get these errors on my Mac.
> In file included from
> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/GPUCommon/include/ 
> itkGPUImageDataManager.h:36,
>                 from
> /Users/lorensen/ProjectsGIT/ITK-build/Modules/Core/GPUCommon/test/ 
> ITKGPUCommonHeaderTest5.cxx:23:
> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/GPUCommon/include/ 
> itkGPUImage.h:158:
> error: ‘GPUDataManager’ has not been declared
> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/GPUCommon/include/ 
> itkGPUImage.h:158:
> error: ISO C++ forbids declaration of ‘Pointer’ with no type
>
> If I add
> #include "itkGPUDataManager.h" in itkGPUImage.h I get different  
> errors:
> In file included from
> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/GPUCommon/include/ 
> itkGPUImageDataManager.h:36,
>                 from
> /Users/lorensen/ProjectsGIT/ITK-build/Modules/Core/GPUCommon/test/ 
> ITKGPUCommonHeaderTest5.cxx:23:
> /Users/lorensen/ProjectsGIT/ITK/Modules/Core/GPUCommon/include/ 
> itkGPUImage.h:191:
> error: expected nested-name-specifier before ‘GPUImageDataManager’



More information about the Insight-developers mailing list