[Insight-users] another question

Luis Ibanez luis.ibanez@kitware.com
Wed, 27 Mar 2002 14:28:05 -0500


Lydia,


You're right, the problem is related to an iostream header.
By default VTK use the traditional header files for iostrem,
like:

                #include <iostream.h>

instead of the new ones used by ITK, like

                #include <iostream>

These two styles are incompatible.


In order to use VTK with ITK you need to set

         VTK_USE_ANSI_STDLIB  to "ON"

in CMake when building VTK. This tells VTK to
use the new standard header files so it can be
compatible with ITK.


Is the "Print" error message appearing when you
compile VTK or when you compile ITK ?


Could you post to the list the complete error message
to get an idea of the file from which this is originated.


Thanks

     Luis



=======================================

ycl lydia wrote:

> Hi Luis,
> Thanks Luis for your reply.
> I don't think that it's a problem of paths, in fact if don't use the 
> flag /D "VTK_USE_ANSI_STDLIB" /GX /Zm1000 in the setting, I have a the 
> following compilation error
> error C2664: 'Print' : cannot convert parameter 1 from 'class 
> std::basic_ostream<char,struct std::char_traits<char> >' to 'class 
> ostream &' A reference that is not to 'const' cannot be bound to a 
> non-lvalue
> But If I use the flag, I have no compilation error but a linkage 
> error, I think this is dur to some iostream library.
>
>
>> From: Luis Ibanez <luis.ibanez@kitware.com>
>> To: ycl lydia <ycllydia@hotmail.com>
>> CC: insight-users@public.kitware.com
>> Subject: Re: [Insight-users] another question
>> Date: Wed, 27 Mar 2002 14:04:55 -0500
>>
>>
>> Hi Lydia,
>>
>> This particular project is intended to present an example
>> of how to link ITK with VTK.
>>
>> It seems that at linking time it is not finding the appropiate
>> VTK libraries.
>>
>> Could you please run CMake and double check that the
>> PATH's you provided for VTK libraries are correct.
>>
>> Please let us know if that helps or not.
>>
>>
>> Thanks
>>
>>
>> Luis
>>
>> -----------------------------------------------------------
>>
>> ycl lydia wrote:
>>
>>> I compiled itk and it works. The only problem that I have is with the
>>> project vtk2itk
>>> I have always this message error
>>> tk2itk.obj : error LNK2001: unresolved external symbol
>>> "__declspec(dllimport) public: void __thiscall vtkObject::Print(class
>>> std::basic_ostream<char,struct std::char_traits<char> > &)"
>>> (__imp_?Print@vtkObject@@QAEXAAV?$basic_ostream@DU?$char_traits
>>> @D@std@@@std@@@Z)
>>>
>>> did anyone already have the same message??
>>>
>>> Lydia
>>>
>>> _________________________________________________________________
>>> Téléchargez MSN Explorer gratuitement à l'adresse
>>> http://explorer.msn.fr/intl.asp.
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users@public.kitware.com
>>> http://public.kitware.com/mailman/listinfo/insight-users
>>>
>>>
>>
>>
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users@public.kitware.com
>> http://public.kitware.com/mailman/listinfo/insight-users
>
>
>
> _________________________________________________________________
> Discutez en ligne avec vos amis, essayez MSN Messenger : 
> http://messenger.msn.fr
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>
>