[Insight-users] error C2872: 'uint16_t' : ambiguous symbol

Dženan Zukić dzenanz at gmail.com
Wed Aug 3 09:01:49 EDT 2011


Well, that is clear. gdcm does not use itk, but itk uses gdcm. So gdcm is
unaware of itk and its namespace. You should have attempted the other thing,
replacing unit16_t with unsigned short (the other alternative), not
itk::uint16_t.

2011/8/3 Zein Salah <zeinsalah at gmail.com>

> Hi,
>
> I am sorry to raise this issue once again, but in trying to figure out
> the problem, I noticed something that might help :).
>
> Well, as I said, I don't use any "using namespace" in my programs
> which generated the error.
> In my code, I included "itkGDCMSeriesFileNames.h", which includes
> "gdcmSerieHelper.h".
> So, I replaced all occurances of "uint16_t" with "itk::uint16_t"in the
> "gdcmSerieHelper.h" file.
> My programs do not generate the error any more. BUT I tried to
> re-combile ITK with
> the newly updated gdcmSeriesHelper.h. Now the project "itkgdcm" failed
> to compile and
> generates an error that 'itk' : is not a class or namespace name at
> every line, where
> I previously added itk::
>
> Any Hints!
>
> Cheers,
> Zein
>
>
>
> 2011/8/2 Dženan Zukić <dzenanz at gmail.com>
> >
> > Can you narrow the problem down? See whether it is caused by ITK, VTK or
> CMake, by combining the newest and the working versions of them.
> >
> > 2011/8/2 Zein Salah <zeinsalah at gmail.com>
> >>
> >> well, the stragne thing is that the same programs, being built with
> >> itk 3.10, vtk 5.21., cmake 2.6.2, do NOT generate the error.
> >>
> >> 2011/8/2 Dženan Zukić <dzenanz at gmail.com>
> >>>
> >>> It is hard to resolve this without source code. But gdcm should
> obviously use its own unit16_t, not itk's one.
> >>>
> >>> 2011/8/1 Zein Salah <zeinsalah at gmail.com>
> >>>>
> >>>> I don't use any "using namespace;"
> >>>>
> >>>>
> >>>> 2011/8/1 Dženan Zukić <dzenanz at gmail.com>
> >>>>>
> >>>>> Do you use "use namespace X;" statements? Because that is what VS was
> complaining about.
> >>>>>
> >>>>> 2011/8/1 Zein Salah <zeinsalah at gmail.com>
> >>>>>>
> >>>>>> I actually don't use namespaces!
> >>>>>> The programs that generate the error are too big to send.
> >>>>>>
> >>>>>> 2011/8/1 Dženan Zukić <dzenanz at gmail.com>
> >>>>>>>
> >>>>>>> This page says:
> >>>>>>> put the #includes before the using namespaces
> >>>>>>>
> >>>>>>> If this is not it, can you supply a small example program which
> triggers the error?
> >>>>>>>
> >>>>>>> On Mon, Aug 1, 2011 at 13:32, Zein Salah <zeinsalah at gmail.com>
> wrote:
> >>>>>>>>
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> After a new installation of ITK 3.20, VTK 5.6.1, ans
> Insightapplications, my own applications
> >>>>>>>> generate many occurances of the following error:
> >>>>>>>>
> >>>>>>>> D:\ITK\3.20\Utilities\gdcm\src\gdcmSerieHelper.h(119) : error
> C2872: 'uint16_t' : ambiguous symbol
> >>>>>>>> 5> could be 'd:\itk\3.20\utilities\gdcm\src\gdcmCommon.h(65) :
> unsigned short uint16_t'
> >>>>>>>> 5> or 'D:\ITK\3.20\Code\Common\itkIntTypes.h(152) : itk::uint16_t'
> >>>>>>>>
> >>>>>>>> Can somebody guess where the problem is?
> >>>>>>>>
> >>>>>>>> Much thanks,
> >>>>>>>> Zein
> >>>>>>>> _____________________________________
> >>>>>>>> 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.html
> >>>>>>>>
> >>>>>>>> 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
> >>>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110803/7b526ff4/attachment.htm>


More information about the Insight-users mailing list