Error with compiling

66 views
Skip to first unread message

Will

unread,
Feb 9, 2010, 2:54:47 AM2/9/10
to fw4spl-discuss
Hi, everybody:

After pulling the latest updates on the fw4spl.
This is the error messages when I racy the Tuto01Basic.

C:\Program Files\Microsoft Visual Studio 9.0\VC\include
\functional(1265) : error C2440: 'type cast' : cannot convert from
'const StringPair' to 'size_t'
No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio 9.0\VC\include
\functional(1264): while compiling class template member function
'size_t std::tr1::hash<_Kty>::operator ()(const _Kty &) const'
with
[
_Kty=StringPair
]
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xhash(183) :
see reference to class template instantiation 'std::tr1::hash<_Kty>'
being compiled
with
[
_Kty=StringPair
]
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/
unordered_map(74) : see reference to class template instantiation
'stdext::_Hash_compare<_Kty,_Hasher,_Keyeq>' being compiled
with
[
_Kty=StringPair,
_Hasher=std::tr1::hash<StringPair>,
_Keyeq=std::equal_to<StringPair>
]
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xhash(191) :
see reference to class template instantiation
'std::tr1::_Umap_traits<_Kty,_Ty,_Tr,_Alloc,_Mfl>' being compiled
with
[
_Kty=StringPair,
_Ty=bool,

_Tr=stdext::_Hash_compare<StringPair,std::tr1::hash<StringPair>,std::equal_to<StringPair>>,
_Alloc=std::allocator<std::pair<const StringPair,bool>>,
_Mfl=false
]
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/
unord
ered_map(86) : see reference to class template instantiation
'stdext::_Hash<_Tra
its>' being compiled
with
[

_Traits=std::tr1::_Umap_traits<StringPair,bool,stdext::_Hash_compare
<StringPair,std::tr1::hash<StringPair>,std::equal_to<StringPair>>,std::allocator
<std::pair<const StringPair,bool>>,false>
]
E:\FW4SPL\Src\fw4spl\SrcLib\core\fwServices\src\fwServices\op
\Info.cpp(31) : see reference to class template instantiation
'std::tr1::unordered_map<_Kty,_Ty>' being compiled
with
[
_Kty=StringPair,
_Ty=bool
]
scons: *** [E:\FW4SPL\Build\fwServices_0-1_win_32_cl9-0_D\fwServices\op
\Info.obj
] Error 2
scons: building terminated because of errors.
Build failled


My Platform: WinXP / Visual C++ 2008 Express.Bonjour guys,

Julien Waechter

unread,
Feb 9, 2010, 5:23:38 AM2/9/10
to fw4spl-...@googlegroups.com
Hi,
Indeed, we have yet a little compatibility problem with VS2008 Express Edition and the implementation TR1&Boost (works with VS2003 and VS2008 pro version).

To fix it temporarily, you can use a simple map, in file fwServices/op/Info.cpp l29
Replace
typedef std::tr1::unordered_map<StringPair, bool> SupportMapType;
by
typedef std::map<StringPair, bool> SupportMapType;

Cheers,
Julien

2010/2/9 Will <hauh...@gmail.com>

Will

unread,
Feb 9, 2010, 10:05:34 PM2/9/10
to fw4spl-discuss
Thanks.
It can compile now.

Thanks.
Will

Reply all
Reply to author
Forward
0 new messages