Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45961

Compile errors using Visual Studio 2015

    XMLWordPrintable

Details

    • 2eeed409e3fed0f0681f128166ac3b3b3fabd57f

    Description

      I am trying to build Qt 5.5 Alpha using Visual Studio 2015.
      Here is my config line: .\configure.bat -prefix "E:\Apps\Builds\Qt 5.4.1 MSVC 2015\x64" -debug-and-release -nomake examples -opensource -c++11 -opengl desktop -platform win32-msvc2015 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -directwrite -direct2d -mp -no-angle
      However I have some build errors:
      The first one is in iaccessible2.cpp, it's about converting const char16_t [] to const OLECHAR * and I fixed it by adding a reinterpret case like this.

      HRESULT STDMETHODCALLTYPE AccessibleApplication::get_toolkitVersion(/* [retval][out] */ BSTR *version)
      {
          *version = ::SysAllocString(reinterpret_cast<const OLECHAR *>(QT_UNICODE_LITERAL(QT_VERSION_STR)));
          return S_OK;
      }
      

      Second one is much harder to fix and its in `CLucene`:

      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.
      
      F:\qt-everywhere-opensource-src-5.5.0-alpha\qttools\src\assistant\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 *>>
              ]
      F:\qt-everywhere-opensource-src-5.5.0-alpha\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 *,lucene::index::IndexReader::CloseCallbackCompare,lucene::index::IndexReader::CloseCallbackCompare,lucene::util::Deletor::Dummy>' being compiled
      F:\qt-everywhere-opensource-src-5.5.0-alpha\qttools\src\assistant\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 *>>
              ]
      F:\qt-everywhere-opensource-src-5.5.0-alpha\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
      

      Adding the #define mentioned in the first error fixed the hash_map and hash_set error, but the second one is mystery to me. It looks like map can't accept the comparator object.

      I think that the error is somewhere in the IndexReader class in IndexReader.h file. I think this lines is the culprit.

      typedef void (*CloseCallback)(IndexReader*, void*);
      
      class CloseCallbackCompare:public CL_NS(util)::Compare::_base{
      public:
      	bool operator()( CloseCallback t1, CloseCallback t2 ) const{
      		return t1 > t2;
      	}
      	static void doDelete(CloseCallback dummy){
      	}
      };
      
      
      typedef CL_NS(util)::CLSet<CloseCallback, void*, CloseCallbackCompare,
      		CloseCallbackCompare> CloseCallbackMap;
      CloseCallbackMap closeCallbacks;
      

      I have also tried the git version, but the problem isn't solved there.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-45961
          # Subject Branch Project Status CR V

          Activity

            People

              heimrich Karsten Heimrich
              nazar554 Nazar Mishturak
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes