Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [SOLVED] Issue Compiling Qt 4.8.0 with Visual Studio 11 under Windows 7: CLucene

[SOLVED] Issue Compiling Qt 4.8.0 with Visual Studio 11 under Windows 7: CLucene

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 7.6k 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.
  • F Offline
    F Offline
    FloGe
    wrote on last edited by
    #1

    I am trying to compile Qt 4.8.0 x86 with Visual Studio 11 Developer preview under Windows 7 x64. I have Windows SDK 6.0A, 6.1 and 7.1 installed.

    I never had issues compiling Qt from version 4.6.2 up to version 4.7.4 under Windows XP/Vista/7 x86 and x64 with Visual Studio 2008 and 2010.

    The configure line is: (msvc2010 because of the hack described below)
    [quote]configure -debug-and-release -opensource -vcproj -qmake -qt-sql-sqlite -platform win32-msvc2010 -mp -system-zlib -system-libpng -no-libjpeg[/quote]

    From "here":http://projects.developer.nokia.com/qt_metro/wiki, I applied this change:
    [quote]As there isn't yet a VS2011 mkspec, you should build with the VS2010 mkspec. Just modify this line in QTDIR\mkspecs\win32-msvc2010\qmake.conf to read:

    QMAKE_COMPILER_DEFINES += _MSC_VER=1700 WIN32

    This will tell the compiler which symbol prefix (used to identify the compiler) to put in the libs.[/quote]

    And from "here":http://projects.developer.nokia.com/qt_metro/wiki/PatchingJSCore, I applied this change:
    [quote]Search for make_pair in the JavaScriptCore? folder (located in QTDIR/src/3rdparty/javascriptcore/JavaScriptCore).

    When you find make_pair() without template arguments and there is an integer parameter, add a + sign to the integer to make it to an rvalue. This should fix compile errors that complain about not being able to convert an unsigned int to an unsigned int&. See  this bug for details. 
    
    When you encounter other make_pair() calls with template arguments, simply remove the template portion. E.g. make_pair<int, int>(1, 2) becomes make_pair(1, 2). Some insight on the issue can be found  here.[/quote]
    

    Those fixes helped with the first errors that occur when trying to compile Qt 4.8.0 with Visual Studio 11. So far, so good.

    But now I ran into an issue with CLucene that wasn't mentioned on those pages:
    @StdHeader.cpp

    C:\temp\qt\src\3rdparty\clucene\src\CLucene/util/VoidMap.h(33) : error C2039: 'iterator' : is not a member of 'lucene::util::Compare::_base'

    C:\temp\qt\src\3rdparty\clucene\src\CLucene/util/VoidMap.h(34) : error C2039: 'const_iterator' : is not a member of 'lucene::util::Compare::_base'@
    Here's the full dump (pasting would break the limit of 6000 chars for one post): http://pastebin.com/SmcrcZN3

    Is there a way to fix these errors manually?

    Or is there a way to disable building CLucene? In "this bug report":https://bugreports.qt-project.org/browse/QTBUG-2728, someone requested that feature but it never made it as a configure option as
    [quote]This should not be a problem anymore. All supported platforms are supposed to be able to compile CLucene.[/quote]
    which is sadly at the moment not the case for me.

    1 Reply Last reply
    0
    • I Offline
      I Offline
      ixSci
      wrote on last edited by
      #2

      Hi, I've stuck with the same issue and have made patch to resolve it: http://pastebin.com/4PRGbcGa

      Please note, that diff is for both problems(javascript and clucene). I've prepared fix for the javascript also because that solution which you mentioned above is just a workaround and my code is a true solution :)

      One more thing: I've not managed to start designer and assistant when build qt on my win7 with msvc2011. It is because of webkit and I don't know where, in it, actually the problem is. So I've built it without webkit and all works like a charm. Could you please post your experience with compiling webkit and lanching assistant?

      1 Reply Last reply
      0
      • F Offline
        F Offline
        FloGe
        wrote on last edited by
        #3

        Ok, I tested your patch. All compilation isses are fixed with it, thanks a lot!

        I compiled with Webkit and then tried starting Assistant and Designer and indeed, they show up in the Task Manager but don't open, and terminate after some time again. But, when I renamed QtWebKit4.dll to _QtWebKit4.dll, they would work just fine. Also, if you check e.g. designer.exe with Dependency Walker, the QtWebKit4.dll is not mentioned as a dependency. Oh well, at least I don't have to recompile it all, just have to make sure the Webkit Dlls are hidden ;)

        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