0

I am getting this problem when I issue the nmake command in the VS2015 x86 Native Tools Command Prompt when trying to compile Qt:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\hash_map(17): error C2338: <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.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\hash_set(17): error C2338: <hash_set> is deprecated and will be REMOVED. Please use <unordered_set>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
c:\Qt-2015\4.8.6\msvc2015\src\3rdparty\clucene\src\CLucene/util/VoidMap.h(228): error C2923: 'std::map': 'std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>::_Compare' is not a valid template type argument for parameter '_Pr'
        with
        [
            _Kty=lucene::index::IndexReader::CloseCallback,
            _Ty=void *,
            _Pr=lucene::index::IndexReader::CloseCallbackCompare,
            _Alloc=std::allocator<std::pair<const lucene::index::IndexReader::CloseCallback ,void *>>
        ]
c:\Qt-2015\4.8.6\msvc2015\src\3rdparty\clucene\src\CLucene/index/IndexReader.h(96): note: see reference to class template instantiation 'lucene::util::CLSet<lucene::index::IndexReader::CloseCallback,void *,lucene::index::IndexReader::CloseCallbackCompare,lucene::index::IndexReader::CloseCallbackCompare,lucene::util::Deletor::Dummy>' being compiled
c:\Qt-2015\4.8.6\msvc2015\src\3rdparty\clucene\src\CLucene/util/VoidMap.h(229): error C2923: 'std::map': 'std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>::_Compare' is not a valid template type argument for parameter '_Pr'
        with
        [
            _Kty=lucene::index::IndexReader::CloseCallback,
            _Ty=void *,
            _Pr=lucene::index::IndexReader::CloseCallbackCompare,
            _Alloc=std::allocator<std::pair<const lucene::index::IndexReader::CloseCallback ,void *>>
        ]
c:\Qt-2015\4.8.6\msvc2015\src\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
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

I have followed these steps to set up Qt and I'm running into the error at step 6.

Any thoughts? I appreciate it.

GreenSaber
  • 1,118
  • 2
  • 26
  • 53
  • You may find this helpfull http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/ – Slava Oct 11 '17 at 15:35

1 Answers1

1

This is a bug in QT before version 5.5 when compiling with visual studio 14.0.

I guess you are trying to compile version 4.8.

Look into below link.... You can see your error.

https://bugreports.qt.io/browse/QTBUG-45961

You may need to download version Qt5.5 or above to compile with visual studio 14.0.

Pavan Chandaka
  • 11,671
  • 5
  • 26
  • 34
  • Well I've been struggling with this all day, thanks for your answer. I need to have version 4.8 to compile source code I have. Do you know if version 5 is backward compatible? – GreenSaber Oct 11 '17 at 22:10
  • Between 4.8 and 5, the backward compatibility, mostly should be okay. – Pavan Chandaka Oct 11 '17 at 22:14