Boost logo

Boost Users :

Subject: Re: [Boost-users] Issues trying to use boost::unordered_map
From: Ram (sourceopen_at_[hidden])
Date: 2016-09-29 04:27:42


Hi Gavin,

[
If you rename the .i file as a .cpp you can then add it to your project and
right-click-Compile it individually. If it still shows the original line
numbers then generate the .i file again but turn on the "Preprocess
Suppress Line Numbers" setting as well.
]
I compiled just that one file(after making changes to log preprocessor
output to file). Replaced the contents of the same file by the contents of
the .i file and tried compiling again and I get lot of errors as follows.
Looks like I am doing something wrong.

------ Build started: Project: Worker, Configuration: Debug Win32 ------
Compiling...
cl : Command line warning D9007 : '/C' requires '/E, /EP or /P'; option
ignored
manager_abc.cpp
c:\program files (x86)\microsoft visual studio 8\vc\include\crtdefs.h(2042)
: error C2011: 'localeinfo_struct' : 'struct' type redefinition
        c:\program files (x86)\microsoft visual studio
8\vc\include\crtdefs.h(2042) : see declaration of 'localeinfo_struct'
c:\program files (x86)\microsoft visual studio 8\vc\include\crtdefs.h(2048)
: error C2011: 'tagLC_ID' : 'struct' type redefinition
        c:\program files (x86)\microsoft visual studio
8\vc\include\crtdefs.h(2048) : see declaration of 'tagLC_ID'
c:\program files (x86)\microsoft visual studio 8\vc\include\crtdefs.h(2057)
: error C2011: 'threadlocaleinfostruct' : 'struct' type redefinition
        c:\program files (x86)\microsoft visual studio
8\vc\include\crtdefs.h(2057) : see declaration of 'threadlocaleinfostruct'
c:\program files (x86)\microsoft visual studio 8\vc\include\yvals.h(561) :
error C2011: 'std::_Lockit' : 'class' type redefinition
        c:\program files (x86)\microsoft visual studio
8\vc\include\yvals.h(561) : see declaration of 'std::_Lockit'
c:\program files (x86)\microsoft visual studio 8\vc\include\yvals.h(708) :
error C2011: 'std::_Mutex' : 'class' type redefinition
        c:\program files (x86)\microsoft visual studio
8\vc\include\yvals.h(708) : see declaration of 'std::_Mutex'
c:\program files (x86)\microsoft visual studio 8\vc\include\yvals.h(760) :
error C2011: 'std::_Init_locks' : 'class' type redefinition
        c:\program files (x86)\microsoft visual studio
8\vc\include\yvals.h(760) : see declaration of 'std::_Init_locks'
c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(59) :
error C2011: '_iobuf' : 'struct' type redefinition
        c:\program files (x86)\microsoft visual studio
8\vc\include\stdio.h(59) : see declaration of '_iobuf'
c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(269) :
error C2995: 'char *gets_s(char (&)[_Size])' : function template has
already been defined
        c:\program files (x86)\microsoft visual studio
8\vc\include\stdio.h(269) : see declaration of 'gets_s'
c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(307) :
error C2995: 'int _snprintf_s(char (&)[_Size],size_t,const char *,...)' :
function template has already been defined
        c:\program files (x86)\microsoft visual studio
8\vc\include\stdio.h(307) : see declaration of '_snprintf_s'
c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(309) :
error C2995: 'int sprintf_s(char (&)[_Size],const char *,...)' : function
template has already been defined
        c:\program files (x86)\microsoft visual studio
8\vc\include\stdio.h(309) : see declaration of 'sprintf_s'
c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(326) :
error C2995: 'errno_t tmpnam_s(char (&)[_Size])' : function template has
already been defined
        c:\program files (x86)\microsoft visual studio
8\vc\include\stdio.h(326) : see declaration of 'tmpnam_s'
c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(336) :
error C2995: 'int _vsnprintf_s(char (&)[_Size],size_t,const char
*,va_list)' : function template has already been defined
        c:\program files (x86)\microsoft visual studio
8\vc\include\stdio.h(336) : see declaration of '_vsnprintf_s'
c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(342) :
error C2995: 'int vsprintf_s(char (&)[_Size],const char *,va_list)' :
function template has already been defined
        c:\program files (x86)\microsoft visual studio
8\vc\include\stdio.h(342) : see declaration of 'vsprintf_s'
c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(422) :
error C2995: 'wchar_t *_getws_s(wchar_t (&)[_Size])' : function template
has already been defined
        c:\program files (x86)\microsoft visual studio
8\vc\include\stdio.h(422) : see declaration of '_getws_s'
...and so on...

Thanks,
Ram



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net