STL and Visual C++ .net conflicts

J

Jean-Baptiste

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.
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'

d:\vs7\include\xutility(25) : error 2011: 'std::eek:utput_iterator_tag' :
'struct' type redefinition
d:\Documents\Visual Studio
Projects\seiscal\stl\stl_iterator_base.h(43) : see declaration of
'std::eek:utput_iterator_tag'
.... etc


If you have an idea on how I could resolve this problem, please help
me !

Thanks a lot,

Jean-Baptiste
 
T

tom_usenet

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::eek:utput_iterator_tag' :
'struct' type redefinition
d:\Documents\Visual Studio
Projects\seiscal\stl\stl_iterator_base.h(43) : see declaration of
'std::eek:utput_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
 
T

tom_usenet

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.

Oh, and note that the correct group for this would be
microsoft.public.vc.stl - this group is not concerned with
implementation specific problems.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,096
Latest member
ThurmanCre

Latest Threads

Top