Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.0 Alpha
-
None
-
windows7, vs2015rc, Qt 5.5 beta
-
2eeed409e3fed0f0681f128166ac3b3b3fabd57f
Description
first i got this error
"<hash_map> is deprecated and will be REMOVED. "
"Please use <unordered_map>. You can define "
"_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS "
"to acknowledge that you have received this warning."
i fixed that by adding
win32-msvc2015:DEFINES += _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
to clucene.pro
then i get this error:
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene/util/VoidMap.h(228): error C2923: 'std::map': 'std::_Tree<std::_Tmap_traits<_K
ty,_Ty,_Pr,_Alloc,false>>::_Compare' is not a valid template type argument for parameter '_Pr'
with
[
_Kty=lucene::index::IndexReader::CloseCallback,
_Ty=void *,
_Pr=std::greater<lucene::index::IndexReader::CloseCallback>,
_Alloc=std::allocator<std::pair<const lucene::index::IndexReader::CloseCallback ,void *>>
]
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene/index/IndexReader.h(96): note: see reference to class template instantiation '
lucene::util::CLSet<lucene::index::IndexReader::CloseCallback,void *,std::greater<lucene::index::IndexReader::CloseCallback>,lucene::index::IndexReader::CloseCa
llbackCompare,lucene::util::Deletor::Dummy>' being compiled
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene/util/VoidMap.h(230): error C3203: 'map': unspecialized class template can't be
used as a template argument for template parameter 'base', expected a real type
after trying about an 1 hour i suddenly saw :
td::_Tree<std::_Tmap_traits<_K
ty,_Ty,_Pr,_Alloc,false>>::_Compare' is not a valid template type
wow std::_Tree has now _Compare member.
this clucene stuff violates the the c++ standard by using _+Cpatial Letter and __for its identifiers a lot.
Names containing double underscore or beginning with an underscore and a capital letter are reserved for implementation (compiler, standard library) and should not be used (e.g. __reserved or _Reserved)
see http://en.wikipedia.org/wiki/Naming_convention_%28programming%29#C_and_C.2B.2B
i simply did a search replace s/_Compare/xx_Compare/
that fixes this.
at last i got this:
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(50): error C2440: '=': cannot convert from 'const char [13
]' to 'char *'
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(50): note: Conversion from string literal loses const qual
ifier (see /Zc:strictStrings)
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(54): error C2440: '=': cannot convert from 'const char [10
]' to 'char *'
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(54): note: Conversion from string literal loses const qual
ifier (see /Zc:strictStrings)
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(58): error C2440: '=': cannot convert from 'const char [8]
' to 'char *'
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(58): note: Conversion from string literal loses const qual
ifier (see /Zc:strictStrings)
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(62): error C2440: '=': cannot convert from 'const char [8]
' to 'char *'
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(62): note: Conversion from string literal loses const qual
ifier (see /Zc:strictStrings)
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(66): error C2440: '=': cannot convert from 'const char [14
]' to 'char *'
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(66): note: Conversion from string literal loses const qual
ifier (see /Zc:strictStrings)
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(70): error C2440: '=': cannot convert from 'const char [5]
' to 'char *'
C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(70): note: Conversion from string literal loses const qual
ifier (see /Zc:strictStrings)
that is fixed by changing line 40 in condition.cpp from
char* StrTitle = NULL;
to
const char* StrTitle = NULL;
Attachments
Issue Links
- duplicates
-
QTBUG-45961 Compile errors using Visual Studio 2015
- Closed
- is required for
-
QTBUG-46344 Support MSVC 2015
- Closed
- resulted in
-
QTBUG-48030 Windows/MSVC2015: Assistant aborts while indexing
- Closed
For Gerrit Dashboard: QTBUG-45976 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
113456,3 | Fix CLucene compile error with VS 2015. | 5.5.0 | qt/qttools | Status: MERGED | +2 | 0 |
113889,1 | Fix CLucene compile error with VS 2015. | 5.5 | qt/qttools | Status: ABANDONED | 0 | 0 |