[Insight-users] Problems with std::basic_stringbuf and vnl
Luis Ibanez
luis.ibanez at kitware.com
Mon, 19 Apr 2004 15:05:22 -0400
Hi Sergio,
Thanks for sending a minimal example.
I created a CMakeLists.txt file for it and
build it in Release mode using Visual Studio 6.0.
Good news:
Your minimal example of code compiles
and links for me without any problem.
Bad news:
The problem should be with your built. :-)
I did this with the CVS version of ITK. I wonder
if it may be a versioninn issue... but, it really
looks like a typical configuration problem.
You probably may want to rebuild your project
from scratch. I will suggest you to try some
of the examples in Insight/Examples. Take any
of the .cxx files, move it to another directory
outside of ITK, write a CMakeLists.txt file for
it and try to build it.
Please let us know if you continue experiencing
any problems.
Regards,
Luis
---------------------
Sergio Andres wrote:
> Hi Luis,
>
> Thanks for your answers...
>
> Yes, I am using CMake for creating my MSVC++ projects ...
>
> But I realized that when I compile itk::XMLReader and
> vnl/vnl_matlab_filewrite..
> I get some link errors..
>
> msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: virtual __thiscall
> std::basic_stringbuf<char,struct std::char_traits<char>,class
> std::allocator<char> >::~basic_stringbuf<char,struct
> std::char_traits<char>,class std::allocator<char> >(void)" (??1?
> $basic_stringbuf at DU?$char_traits at D at std at at V?$allocator at D at 2 at at std at at UAE at XZ)
> already defined in itkvnl.lib(vnl_matlab_filewrite.obj)
> msvcprt.lib(MSVCP60.dll) : error LNK2005: "protected: void __thiscall
> std::basic_stringbuf<char,struct std::char_traits<char>,class
> std::allocator<char> >::_Tidy(void)"
> (?_Tidy at ?$basic_stringbuf at DU?$char_traits at D at std at at V?$allocator at D at 2 at at std at at IAEXXZ)
>
> already defined in itkvnl.lib(vnl_matlab_filewrite.obj)
> Release/Main.exe : fatal error LNK1169: one or more multiply defined
> symbols found
> Error executing link.exe.
>
>
> These errors are similar to those I sent previously...
> But, I have no idea about them...
>
> My code is the following: (compiled for Release)
> ----------------------------------------------------
> #include <itkXMLFile.h>
> #include <vnl/vnl_matlab_filewrite.h>
>
> int main()
> {
>
> typedef itk::XMLReader<double> ReaderType;
> ReaderType::Pointer reader = ReaderType::New();
>
> vnl_matlab_filewrite mat("file.mat");
>
> return 0;
> }
> ----------------------------------------------------
>
> I will appreciate any help. :)
>
> Regards,
> Sergio.
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>