stdcxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: Conflict beetween stdcxx and visual hash_map implementation at compilation
Date Thu, 09 Nov 2006 16:45:20 GMT
Nadine Faizant wrote:
>  
>     Hello,
>  
>     I finally understand that hash_map is not part of STL :-(   I found 
> the stdext::hash_map from VC compilator extension. While I'm compiling 
> my code using strdcxx STL I have got compilation error under Visual 8
>  
>  
> Here is my c++ source.
>  
> 
> #include <hash_map>

You can't mix stdcxx or any other third party implementation with
the native C++ standard library. All headers must come from the
same implementation of the C++ standard library, and so must all
the libraries you link with. It's quite likely that VC++ hash_map
makes assumptions about some other components of the library that
don't hold for the third party implementation.

> 
> #include <tchar.h>
> 
> int _tmain(int argc, _TCHAR* argv[])
> 
> {
> 
> typedef stdext::hash_map<int, std::string, std::string, std::string> tutu;
> 
> return 0;
> 
> }
> 
> Output command:
> 
> see attach ziped file

 From the make-E.txt file it's clear that you are mixing VC++ headers
with those of stdcxx in the same translation unit. That's wrong. You
need to pick one implementation and stick with it.

Martin

> 
> Compilation command :
>  
> /Od /I "D:\NPTE\dev\src\cpp\externals\win32\include" /I 
> "D:\NPTE\dev\src\cpp\externals\win32\include\ansi" /I 
> "D:\NPTE\dev\src\cpp\externals\win32\include\15d" /D "WIN32" /D "_DEBUG" 
> /D "_CONSOLE" /D "_RWSTD_USE_CONFIG" /D "_RWSHARED" /D "_RWSTDDEBUG" /D 
> "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" 
> /Fd"Debug\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt
> If i do not use stdcxx (no include file and preprocessor flags), there 
> is no error. I have tried a make -E, but I don't understand what happens 
> (attach ziped  file).
>  
> Any help appreciated,
>  
>     Thanks,
>  
>     Nadine
> ------------------------------------------------------------------------
> < b>*Nadine Faizant*
> *NewPhenix*
> Z.A. - 5, Rue de l'Auberte
> 30 133 Les Angles
> 
> Tél : 04 90 26 74 82
> Fax : 04 90 26 90 84
> Courriel : nadine.faizant@nautitia.fr <mailto:nadine.faizant@nautitia.fr>
> ------------------------------------------------------------------------


Mime
View raw message