Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Does Qt 4.8.5 compile with VC11 (VS2012)?
Forum Updated to NodeBB v4.3 + New Features

Does Qt 4.8.5 compile with VC11 (VS2012)?

Scheduled Pinned Locked Moved General and Desktop
9 Posts 5 Posters 7.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HeinzBaumann
    wrote on last edited by
    #1

    I have downloaded the new Qt 4.8.5 RC2. Does this successfully compile with VC11 on 64 bit Win7?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on last edited by
      #2

      Haven't tried 4.8.5 yet (but nice to see there is still somebody working on 4.8 maintenance!), but 4.8.4 compiled nice for me with VS2012. Unless there is a serious regression in 4.8.5, it should compile too, I guess...

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      1 Reply Last reply
      0
      • H Offline
        H Offline
        HeinzBaumann
        wrote on last edited by
        #3

        I am getting a compile errro in YArrJit.cpp with the include file hashset.h.

        YarrJIT.cpp
        .\wtf/HashSet.h(180) : error C2664: 'std::pair<_Ty1,_Ty2>::pair(const std::pair<
        _Ty1,_Ty2> &)' : cannot convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to 'cons
        t std::pair<_Ty1,_Ty2> &'
        with
        [
        _Ty1=WTF::HashTableConstIteratorAdapter<WTF::HashTable<void *,void *
        ,WTF::IdentityExtractor<void *>,WTF::PtrHash<void *>,WTF::HashTraits<void *>,WTF
        ::HashTraits<void *>>,void *>,
        _Ty2=bool
        ]
        and
        [
        _Ty1=WTF::HashTableIterator<void *,void *,WTF::IdentityExtractor<voi
        d *>,WTF::PtrHash<void *>,WTF::HashTraits<void *>,WTF::HashTraits<void *>>,
        _Ty2=bool
        ]
        and
        [
        _Ty1=WTF::HashTableConstIteratorAdapter<WTF::HashTable<void *,void *
        ,WTF::IdentityExtractor<void *>,WTF::PtrHash<void *>,WTF::HashTraits<void *>,WTF
        ::HashTraits<void *>>,void *>,
        _Ty2=bool
        ]
        Reason: cannot convert from 'std::pair<_Ty1,Ty2>' to 'const std::pair<
        Ty1,_Ty2>'
        with
        [
        _Ty1=WTF::HashTableIterator<void *,void *,WTF::IdentityExtractor<voi
        d *>,WTF::PtrHash<void *>,WTF::HashTraits<void *>,WTF::HashTraits<void *>>,
        _Ty2=bool
        ]
        and
        [
        _Ty1=WTF::HashTableConstIteratorAdapter<WTF::HashTable<void *,void *
        ,WTF::IdentityExtractor<void *>,WTF::PtrHash<void *>,WTF::HashTraits<void *>,WTF
        ::HashTraits<void *>>,void *>,
        _Ty2=bool
        ]
        No user-defined-conversion operator available that can perform this conv
        ersion, or the operator cannot be called
        .\wtf/HashSet.h(179) : while compiling class template member function 's
        td::pair<_Ty1,_Ty2> WTF::HashSet<ValueArg>::add(void *const &)'
        with
        [
        _Ty1=WTF::HashTableConstIteratorAdapter<WTF::HashTable<void *,void *
        ,WTF::IdentityExtractor<void *>,WTF::PtrHash<void *>,WTF::HashTraits<void *>,WTF
        ::HashTraits<void *>>,void *>,
        _Ty2=bool,
        ValueArg=void *
        ]
        c:\users\heinz\qt\4.8.5\src\3rdparty\webkit\source\javascriptcore\heap\M
        arkStack.h(74) : see reference to function template instantiation 'std::pair<_Ty
        1,_Ty2> WTF::HashSet<ValueArg>::add(void *const &)' being compiled
        with
        [
        _Ty1=WTF::HashTableConstIteratorAdapter<WTF::HashTable<void *,void *
        ,WTF::IdentityExtractor<void *>,WTF::PtrHash<void *>,WTF::HashTraits<void *>,WTF
        ::HashTraits<void *>>,void *>,
        _Ty2=bool,
        ValueArg=void *
        ]
        c:\users\heinz\qt\4.8.5\src\3rdparty\webkit\source\javascriptcore\heap\M
        arkStack.h(195) : see reference to class template instantiation 'WTF::HashSet<Va
        lueArg>' being compiled
        with
        [
        ValueArg=void *
        ]
        Generating Code...
        NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
        \VC\BIN\cl.EXE"' : return code '0x2'
        Stop.
        I file a bug on this.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MuldeR
          wrote on last edited by
          #4

          Well, here is my attempt to build Qt 4.8.5 (RC-1) with VS2012:
          http://tinyurl.com/qt485rc1

          Note that this is a static build, so you need to define QT_NO_DLL.

          My OpenSource software at: http://muldersoft.com/

          Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

          Go visit the coop: http://youtu.be/Jay...

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MuldeR
            wrote on last edited by
            #5

            Link should be fixed now. Sorry.

            (Note: This forum scrambled the URL by replacing "x" with a \times character)

            My OpenSource software at: http://muldersoft.com/

            Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

            Go visit the coop: http://youtu.be/Jay...

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MuldeR
              wrote on last edited by
              #6

              Update

              The error you were getting is related to Webkit and VS2012. I didn't encounter this issue before, since I usually do static builds that have Webkit disabled anyway. But for shared builds, simply add "-no-webkit" when you run configure.exe. If you really need Webkit, there is a patch on the bugtracker...

              My OpenSource software at: http://muldersoft.com/

              Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

              Go visit the coop: http://youtu.be/Jay...

              1 Reply Last reply
              0
              • raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by
                #7

                you may also find this "link":http://stackoverflow.com/a/13085842 interesting.

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  raulgd
                  wrote on last edited by
                  #8

                  Hi,

                  If you wanna build with webkit, you should patch the HashSet.h file with the following:

                  START DIFF PATCH
                  diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h
                  index 82245f3..7298558 100644
                  --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h
                  +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/HashSet.h
                  @@ -92,6 +92,17 @@ namespace WTF {
                  friend void deleteAllValues<>(const HashSet&);
                  friend void fastDeleteAllValues<>(const HashSet&);

                  •    // msvc2012 has trouble constructing a HashTableConstIteratorAdapter from a HashTableIterator
                    
                  •    // despite the existence of a const_iterator cast method on the latter class.
                    
                  •    pair<iterator, bool> iterator_const_cast(const pair<typename HashTableType::iterator, bool>& p)
                    
                  •    {
                    
                  •        // Spell out the full conversion chain for clarity, although any of the "hint"
                    
                  •        // given by the alternatives below would have been enough.
                    
                  •        return make_pair(iterator(HashTableType::const_iterator(p.first)), p.second);
                    
                  •        //     return make_pair(iterator(p.first), p.second);
                    
                  •        //     return make_pair(HashTableType::const_iterator(p.first), p.second);
                    
                  •    }
                    
                  •    HashTableType m_impl;
                    
                    };

                  @@ -177,7 +188,7 @@ namespace WTF {
                  template<typename T, typename U, typename V>
                  inline pair<typename HashSet<T, U, V>::iterator, bool> HashSet<T, U, V>::add(const ValueType& value)
                  {

                  •    return m_impl.add(value);
                    
                  •    return iterator_const_cast(m_impl.add(value));
                    

                    }

                    template<typename Value, typename HashFunctions, typename Traits>
                    @@ -186,7 +197,7 @@ namespace WTF {
                    HashSet<Value, HashFunctions, Traits>::add(const T& value)
                    {
                    typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter;

                  •    return m_impl.template addPassingHashCode<T, T, Adapter>(value, value);
                    
                  •    return iterator_const_cast(m_impl.template addPassingHashCode<T, T, Adapter>(value, value));
                    

                    }

                    template<typename T, typename U, typename V>

                  END DIFF PATCH

                  I actually thought the patch was gonna be released on 4.8.5, but it wasn't, I still will create a new post mentioning this to see why this fix wasn't released.

                  BTW: I didn't encase this in code markup because it gets all messed up because I couldn't escape the AT sign correctly, just copy paste the code above and remove the \ from every @

                  Raul Guerrero
                  http://jimi.mx

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    ArbolOne
                    wrote on last edited by
                    #9

                    Humm, this is interesting.

                    This is not the first time you've been here, at the end you've always lost. You create viruses and we the cure, and in this battle you've always lost.

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved