Re: STL and Visual C++ .net conflicts

From: tom_usenet (tom_usenet_at_hotmail.com)
Date: 11/05/03


Date: Wed, 05 Nov 2003 11:42:33 +0000

On 5 Nov 2003 01:26:55 -0800, jibp@infonie.fr (Jean-Baptiste) wrote:

>Hi,
>
>I am currently porting a C++ project (linux version) under windows.
>This project uses the STL stuff. When I try to compile and built my
>project, I get a lot of errors.

Remove all of the old STL headers from the project.

>The main part of them seems to be due to the stl library. Indeed, it
>seems that the standard libary redefines some structure already
>defined in xutility.
>
>I tryed some tricks without any success.
>
>I copy paste some errors I get as an example.
>
>...
>d:\vs7\include\xutility(21) : error C2011: 'std::input_iterator_tag' :
>'struct' type redefinition
>d:\Documents\Visual Studio
>Projects\seiscal\stl\stl_iterator_base.h(42) : see declaration of
>'std::input_iterator_tag'

What is the above file? Why is it part of your project? Iterators are
part of the standard library and shouldn't be included in your project
directory. You should delete the whole stl directory from your
project.

>
>d:\vs7\include\xutility(25) : error 2011: 'std::output_iterator_tag' :
>'struct' type redefinition
>d:\Documents\Visual Studio
>Projects\seiscal\stl\stl_iterator_base.h(43) : see declaration of
>'std::output_iterator_tag'
>... etc
>
>
>If you have an idea on how I could resolve this problem, please help
>me !

If you have problems with differences between the STL you were using
and Dinkumware's STL, consider using STLport (www.stlport.org) which
is likely to be more similar to the one you were using. In any case,
it is probably better to remove any non-standard use of the STL from
your project - the Dinkumware library that comes with MSVC.NET is
approximately 100% standards compliant, but your code might not be...

Tom



Relevant Pages

  • Re: Kann hier auch zum Thema c++ gefragt werden ?
    ... Gemeint war die STL = Standard Lib, sorry, Info: ... one can now push and pop integers onto this stack. ... In Java hat ist man übrigens von einigen zentralen Klassen, ...
    (de.comp.lang.c)
  • STL and Visual C++ .net conflicts
    ... The main part of them seems to be due to the stl library. ... 'struct' type redefinition ...
    (comp.lang.cpp)
  • Re: Polyspace Problem
    ... struct __type_traits{ ... Get rid of the leading underscores. ... STL being the C++ Standard Template Library. ...
    (comp.lang.c)
  • Re: Polyspace Problem
    ... struct __type_traits{ ... Get rid of the leading underscores. ... STL being the C++ Standard Template Library. ...
    (comp.lang.c)
  • Re: Visual Studio STL on Linux? Portable STL suggestion?
    ... STL freely available with a commercial licence for e.g. Linux? ... the C++ standard (in fact it was in large parts incorporated into the ... MFC so you couldn't legally compile it using WINE under a free OS. ... STLport is a free project that also aims to provide a portable standard ...
    (microsoft.public.vc.stl)