[Insight-developers] Compile errors in GPUCommon
Kris Zygmunt
krismz at sci.utah.edu
Wed Jun 6 13:19:28 EDT 2012
Ok, submitted the patch at http://review.source.kitware.com/6116
There were a couple of GPUCommon compiler warnings in
itkGPUReduction.hxx and itkGPUReductionTest.cxx that I added to this
patch as well.
I'm somewhat surprised that this circular include issue hasn't caused
any other compile issues until now, but I am often mystified by the
inner workings of compilers.
-Kris
On Jun 6, 2012, at 11:05 AM, Bill Lorensen wrote:
> 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