[Insight-users] Problem with VC.NET 7.1

Luis Ibanez luis.ibanez at kitware.com
Tue Aug 3 17:11:28 EDT 2004


Hi Ender,

You are trying to build the examples by configuring
their independent subdirectories.

However the examples have been configured to be
built from the top directory of ITK.

Just enable BUILD_EXAMPLES when you run CMake at
the top level of the Insight directory.

If you want to extract examples and build them as
isolated project, you simply should follow the
instructions on the "Getting Started I" tutorial


  http://www.itk.org/HTML/Tutorials.htm


http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/img0.html




    Regards,


      Luis


------------------------------
konukoge at boun.edu.tr wrote:

> And also why wouldn't any example give some linking errors.
> For example the errors I get when I try to build MeanImageFilter.cpp
> example I get these linking errors
> 
> MeanImageFilter.obj : error LNK2019: unresolved external symbol "public: static
> class itk::SmartPointer<class itk::ImageIOBase> __cdecl
> itk::ImageIOFactory::CreateImageIO(char const *,enum
> itk::ImageIOFactory::FileModeType)"
> (?CreateImageIO at ImageIOFactory@itk@@SA?AV?$SmartPointer at VImageIOBase@itk@@@2 at PBDW4FileModeType@12@@Z)
> referenced in function "public: virtual void __thiscall
> itk::ImageFileReader<class itk::Image<unsigned char,2>,class
> itk::DefaultConvertPixelTraits<unsigned char>
> 
>>::GenerateOutputInformation(void)"
> 
> (?GenerateOutputInformation@?$ImageFileReader at V?$Image at E$01 at itk@@V?$DefaultConvertPixelTraits at E@2@@itk@@UAEXXZ)
> 
> MeanImageFilter.obj : error LNK2019: unresolved external symbol "public:
> unsigned int __thiscall itk::ImageIOBase::GetImageSizeInBytes(void)const "
> (?GetImageSizeInBytes at ImageIOBase@itk@@QBEIXZ) referenced in function
> "protected: virtual void __thiscall itk::ImageFileReader<class
> itk::Image<unsigned char,2>,class itk::DefaultConvertPixelTraits<unsigned char>
> 
>>::GenerateData(void)"
> 
> (?GenerateData@?$ImageFileReader at V?$Image at E$01 at itk@@V?$DefaultConvertPixelTraits at E@2@@itk@@MAEXXZ)
> 
> MeanImageFilter.obj : error LNK2019: unresolved external symbol "public: void
> __thiscall itk::ImageIOBase::SetNumberOfDimensions(unsigned int)"
> (?SetNumberOfDimensions at ImageIOBase@itk@@QAEXI at Z) referenced in function
> "public: virtual void __thiscall itk::ImageFileWriter<class itk::Image<unsigned
> char,2> >::Write(void)"
> (?Write@?$ImageFileWriter at V?$Image at E$01 at itk@@@itk@@UAEXXZ)
> Debug\MeanImageFilter.exe : fatal error LNK1120: 3 unresolved externals
> 
> 
> Thanks a lot.
> Ender
> Quoting Luis Ibanez <luis.ibanez at kitware.com>:
> 
> 
>>Hi Ender,
>>
>>Visual Studio 6.0 has a very poor support
>>for the "typename" keyword. It basically
>>ignores it when it is present, and do not
>>requires it when the C++ standard says it
>>should be there.
>>
>>Visual Studio 7 fixed those problems and
>>now requires the presence of "typename"
>>as the C++ estandard stablishes. In other
>>words, VC 7.1 is now *almost* as good as
>>GCC. At least regarding "typename"    :-)
>>
>>The fact that your code was compiling ok
>>with VC 6.0 doesn't mean that your code
>>is correct.  VC 7.1 has a much superior
>>compiler at least as far as compliance with
>>the C++ standard goes.
>>
>>Please post to the list the error messages
>>(and associated code snippets) that you get
>>when compiling with Visual Studio 7.1.
>>
>> From those messages we probably will be able
>>to help you find where are you missing "typenames".
>>
>>
>>
>>    Regards,
>>
>>
>>       Luis
>>
>>
>>
>>-----------------------------
>>konukoge at boun.edu.tr wrote:
>>
>>
>>>Hi all,
>>>
>>>I have an interesting problem with vc.net 7.1 2003. I have a c++ code that
>>
>>works
>>
>>>perfectly well when compiled with itk and vc++ 6.0. However when I build
>>
>>ITK
>>
>>>with .net 7.1 , build the program again with this configuration, it gives
>>
>>me
>>
>>>error about typename's. And when I try to build any example of itk with
>>
>>the
>>
>>>latter configuration I have linking errors. Do you know of any problems of
>>
>>ITK
>>
>>>or CMake with .net 7.1
>>>
>>>Thanks a lot
>>>
>>>Ender Konukoglu
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>>
>>
>>
>>
> 
> 
> 
> 






More information about the Insight-users mailing list