[Insight-developers] Compile errors in GPUCommon

Bill Lorensen bill.lorensen at gmail.com
Wed Jun 6 13:05:00 EDT 2012


Kris,

By just removing #include "itkGPUImage.h" from
itkGPUImageDataManager.h fixed it for me.

Can you submit a patch to gerrit?

Thanks,

Bill

On Wed, Jun 6, 2012 at 12:57 PM, Kris Zygmunt <krismz at sci.utah.edu> wrote:
> 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’
>
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the Insight-developers mailing list