[Solved] Doxygen for Qt Creator 2.7.0



  • Hi all,

    I have Qt Creator 2.7.0 on Windows installed with Qt SDK 5.0.2.

    I have been attempting to install Doxygen following the doxygen for Qt website guidelines (very simple). However this only supports Qt Creator up to version 2.4.0 so I end up with doxygen plug giving me errors like:

    "Could not resolve dependency "Core(2.4.0)"...

    I am sure I am not the first to have this issue!, but I could not find a resolution in our questions database. Does anyone have any pointers?

    Thanks all!


  • Moderators

    Perhaps if you compile Qt Creator and doxygen from source it would work.

    I always use doxygen from command line, works fine there :) But that is on Linux, I have not tried it on Windows.



  • :o Ohh.... always with the recompile everything ... lol ;)

    I really don't want to do that if I can avoid it!, is there not a simpler way to use the plugin for Doxygen? - I guess it's doxygen that needs to be compiled for Qt so it uses my newer libs?


  • Moderators

    As said, I have no idea.



  • Any other offers? :)


  • Moderators

    It is the plugin you have to compile with the same compiler as Qt creator AFAIK. At least that is what I have done. I was not sure if I could mix the creator compilation (msvc2008 IIRC) with MinGW.

    The main issues are the size of occupied disk space and that you have to recompile each time for each release. Therefore, I am happily continue to work with Qt creator V2.6.0

    At sierdzlo
    The doxygen functionality of the plugin is more than just doing the doxygen parsing. However, I have extended it a bit more, which really requires the compilation.



  • Koahing, does that mean I just need to recompile that "Doxygen.dll" file?
    And perhaps even the Doxygen.pluginspec (whatever that is)?

    I am going to get the sources from:
    http://svn.kofee.org/svn/qtcreator-doxygen/trunk and then try to compile them with Qt Creator.... sounds about right?

    Thanks :)


  • Moderators

    IIRC you need to edit the pluginspec file, but that did not help alone. You need also to create a new dll.
    I decided to compile Qt creator myself, since at least at that only MSVC2008 pre-builds of creator where available. But I did not want to install MSVC2008. Mixing my MinGW compilation did not work, therefore I have compiled creator and the plugin with the same compiler.
    AFAIK the instructions were straight forward. Nothing special I remember.



  • I could not get the sources from the SVN link so I got them from the webSVN link :)

    Sources from: http://svn.kofee.org/listing.php?repname=QtCreator-Doxygen

    However when I try to compile this doxygen.pro project I get errors:

    Can't fine these files:
    include( $$IDE_SOURCE_TREE/src/qtcreatorplugin.pri )
    include( $$IDE_SOURCE_TREE/src/plugins/coreplugin/coreplugin.pri )
    include( $$IDE_SOURCE_TREE/src/plugins/texteditor/texteditor.pri )
    include( $$IDE_SOURCE_TREE/src/plugins/cppeditor/cppeditor.pri )
    And cant find this either
    #include <libs/extensionsystem/iplugin.h>

    I did a manual search over my Qt Folder, there are some .pri files in there but I can't find these ones anywhere!

    What does it all mean? :o I have a feeling it is looking for the Qt Creator source file directory or somthing (after reading through the doxygen.pro file).

    Thanks!


  • Moderators

    [quote author="code_fodder" date="1371462503"]I have a feeling it is looking for the Qt Creator source file directory or somthing (after reading through the doxygen.pro file).[/quote]
    Yes, it does for sure.

    I did it more than 1/2 year ago, but since the source I required anyhow, my decision to compile the whole stuff creator and the plugin was more of an incremental one. After that never change a running system ;)



  • haha, thnaks! ohhh... my beard is growing long :o

    I was trying to find where the source is for Qt Creator but my SVN does not seem to connect to the link. Is there a similar webSVN link for the repo?

    Thanks!


  • Moderators

    I am not sure if you really want to fiddle around with the very newest changes in case if there is an issue.

    It propose using the "zip from download page":http://download.qt-project.org/official_releases/qtcreator/2.7/2.7.1/qt-creator-2.7.1-src.zip
    I had done that to.

    Another option would be starting with Gitorious which has really some benefits, but your beard might get even longer. ;-)



  • ok....beard a little longer...lol :)

    I tried the zip link you sent me... but that failed to build. Then I realised that was for QtCreator 2.7.1 and I want it for 2.7.0 (as that is what the doxygen project is looking for). So I went and downloaded the 2.7.0 QtCreator sources. This time the compile worked :)

    But the linking failed :(

    I got these errors:
    @c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lAggregation
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lExtensionSystem
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lUtils
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lCore
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lFind
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lLocator
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lTextEditor
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lCPlusPlus
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lLanguageUtils
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lProjectExplorer
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lCppTools
    c:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lCppEditor@

    Can't quite fathom what that is about...


  • Moderators

    Is this the compile run of the doxygen plugin?



  • Yes. I downloaded the doxygen sources.

    Then download the QtCreator sources and put them in the same folder as doxygen.pro looks for them

    Then I open doxygen.pro in QtCreator 2.7.0 and build it.

    The compile seems good, but the link with "ld" fails as above...


  • Moderators

    Well, you need to compile Qt creator first. Those libraries are build during this process. I think that is the same issue as I had :-(
    AFAIK there is no other way.



  • :o

    ok, thanks for your help!, I have run out of time today so I will set this QtCreator build over night (I assume it takes a while) and report back in the morning, clean and shaved! :)


  • Moderators

    Depends on PC. For me, Qt Creator builds in about 15 minutes (quad core with HT).


  • Moderators

    I think it took a bit more than 15 minutes. However, I did not use the potential of my quad core. IIRC the MinGW version did not support. At least I did not know how.
    IIRC there was a thread on taking advantage of multiple cores, which was not enthusiastic. Somehow I connect some reluctant comments with Tobias, but that might be wrong. Nevertheless, so far I did not see issues with compilation in creator and using the option -j 4 for MinGW.



  • Hmm interesting, I myself use Doxygen (under Mint KDE 14) but throw its Wizard GUI and I didn't try to use Qt Creator plugin.

    Now after successful building could you please contact the maintainer of Qt Creator Doxygen Plugin to notify him/her about the new binaries?

    P.S. I appreciate to publish your build for Qt Ctrator 2.7.0 here :)



  • By the way, I modified "Wiki page":https://qt-project.org/wiki/Qt_Creator_Plug-in_Gallery until some one build Qt Creator binaries for 2.7.x



  • Ok, from my side I seem to be going backwards :(

    I got the source files for Qt Creator (qt-creator-2.7.0-src.tar.gz) this is the same version that I have installed (via SDK 5.0.2).

    I put them into the path: C:\Qt\qt-creator-2.7.0-src and then open the QtCreator.pro file.

    I get the following messages after parsing:
    @Could not find .pro file for sub dir '../shared/qbs/src/lib' in 'C:/Qt/qt-creator-2.7.0-src/src/libs/../shared/qbs/src/lib'
    Could not find .pro file for sub dir '../shared/qbs/src/plugins' in 'C:/Qt/qt-creator-2.7.0-src/src/libs/../shared/qbs/src/plugins'
    Could not find .pro file for sub dir '../shared/qbs/static.pro' in 'C:/Qt/qt-creator-2.7.0-src/src/libs/../shared/qbs/static.pro'
    C:/Qt/build-qtcreator-Desktop_Qt_5_0_2_MinGW_32bit-Debug/.qmake.cache(1): Missing closing " quote
    Could not find .pro file for sub dir '../shared/qbs/src/lib' in 'C:/Qt/qt-creator-2.7.0-src/src/libs/../shared/qbs/src/lib'
    Could not find .pro file for sub dir '../shared/qbs/src/plugins' in 'C:/Qt/qt-creator-2.7.0-src/src/libs/../shared/qbs/src/plugins'
    Could not find .pro file for sub dir '../shared/qbs/static.pro' in 'C:/Qt/qt-creator-2.7.0-src/src/libs/../shared/qbs/static.pro'@

    Then I hit build and get the errors:

    @C:\Qt\build-qtcreator-Desktop_Qt_5_0_2_MinGW_32bit-Debug.qmake.cache:1: error: Missing closing " quote
    C:\Qt\Qt5.0.2\5.0.2\mingw47_32\mkspecs\features\testcase_targets.prf:4: error: 'prepareRecursiveTarget' is not a recognized test function.
    @

    So I can't even seem to get the first simple steps right.... what I am doing wrong? :o

    Support appreciated :)


  • Moderators

    This is for building Qt creator, right?


  • Moderators

    Build from command line.

    Errors are all about QBS, which is an external plugin. You need to either download QBS source code and put it where it belongs, or get the whole Qt Creator + QBS from git. See this guide: "link":http://qt-project.org/doc/qtcreator-2.7/creator-project-qbs.html.



  • noooooooooo, more extra steps :o

    I just prefer to do the easiest option :)
    Build from command line sounds fine with me, I have not a clue how to do that though!, somthing like qmake -r or such? ... I tried a few of these things that I read. I even tried the mingw32 make command in the top level directory, but these did not work for me :(

    @Koahnig, yes, sorry that is still for QtCreator only I have not got past that step yet :(


  • Moderators

    The Qt creator source folder has a README. I have this IIRC. Sometimes RTFM helps :P but I am a candidate to ignore those as well.
    I was checking my folders and could not find qbs, but the link supplied by sierdzio shows that it is something new.



  • yeah, I read that readme... this is where I tried to run qmake -r .. or make, but these commands are not known. So then I added the mingw\bin path and it is still not known, so this was confusing me :(

    I will try it again tomorrow, but I am not sure that I have all that I need...


  • Moderators

    [quote author="code_fodder" date="1371576312"]yeah, I read that readme... this is where I tried to run qmake -r .. or make, but these commands are not known. So then I added the mingw\bin path and it is still not known, so this was confusing me :(

    I will try it again tomorrow, but I am not sure that I have all that I need...[/quote]
    Well, need to type the path with the commands. Alternatively, you can add the path to environment. I would clean the path setting anyway before starting to build. It helps to know what the system is using ;-)



  • This is little frustrating me at the moment... I have got a little further.

    I have created a batch file to set my paths like this:

    @@echo off
    set PATH=C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin;C:\Qt\Qt5.0.2\Tools\MinGW\bin;C:\Qt\Qt5.0.2\Tools\QtCreator\creator\bin;%PATH%
    echo %PATH%
    set QMAKESPEC=win32-g++
    cd C:\Qt\qt-creator-2.7.0-src
    cmd@

    Then I run qmake -r and I get this following errors which look similar to my first errors :(

    @C:\Qt\qt-creator-2.7.0-src>qmake -r
    Reading C:/Qt/qt-creator-2.7.0-src/src/src.pro
    C:/Qt/qt-creator-2.7.0-src/.qmake.cache:1: Missing closing " quote
    MAKEFILE_GENERATOR variable not set as a result of parsing : src.pro. Possibly qmake was not able to find files included
    using "include(..)" - enable qmake debugging to investigate more.
    Reading C:/Qt/qt-creator-2.7.0-src/share/share.pro
    C:\Qt\Qt5.0.2\5.0.2\mingw47_32/mkspecs/features/testcase_targets.prf:4: 'prepareRecursiveTarget' is not a recognized tes
    t function.
    Reading C:/Qt/qt-creator-2.7.0-src/share/qtcreator/static.pro
    MAKEFILE_GENERATOR variable not set as a result of parsing : static.pro. Possibly qmake was not able to find files inclu
    ded using "include(..)" - enable qmake debugging to investigate more.
    Reading C:/Qt/qt-creator-2.7.0-src/share/qtcreator/translations/translations.pro
    MAKEFILE_GENERATOR variable not set as a result of parsing : translations.pro. Possibly qmake was not able to find files
    included using "include(..)" - enable qmake debugging to investigate more.
    MAKEFILE_GENERATOR variable not set as a result of parsing : share.pro. Possibly qmake was not able to find files includ
    ed using "include(..)" - enable qmake debugging to investigate more.
    Reading C:/Qt/qt-creator-2.7.0-src/lib/qtcreator/qtcomponents/qtcomponents.pro
    MAKEFILE_GENERATOR variable not set as a result of parsing : qtcomponents.pro. Possibly qmake was not able to find files
    included using "include(..)" - enable qmake debugging to investigate more.@

    So... what is the next step that I am missing? :o

    Thanks :)


  • Moderators

    Hmmmhh...
    I would guess it has something to do with your Qt 5 installation. Presumably it is broken.
    I had a check a couple of days ago, since there was another thread reporting MAKEFILE_GENERATOR problems. The MAKEFILE_GENERATOR basically states the OS (unix or apparently different windows variants). Have a look to the mkspecs files of your Qt 5 installation folder. Each these files declare this. In particular have a look to win32-g++ you are referring to.



  • Ok.... so I took your thoughts and assumed there is something wrong with my setup and started over. When reading through the readme I noticed that after the part saying that you need to run qmake -r, further down there is a list of pre-requisites like GIT and active state perl. I did not expect the pre-requisites to be after the qmake command :o

    So I installed both of these (I assume it was perl that I was missing). Also when I run "sh.exe" it runs a shell, that should not happen either apparently if that happens your build will fail!

    So after going through these steps with a fine-toothed comb I think the build is now running :) ... currently it is reading its way through various .pro files and is taking quite a long time so I will wait for that to finish and report back!

    Once I get doygen working I am going to write a detailed wiki!! :o

    So if this works I may still need a few more pointers and all help so far has been really appreciated :)



  • hmmm.....ok I am running through step 10:

    @ 10. You are now ready to configure and build Qt and Qt Creator.
    To use MinGW, open the the shell prompt and enter:

         cd qt
         configure -debug && mingw32-make -s
         cd ..\creator
         qmake && mingw32-make -s@
    

    I have just entered the configure line.... its doing a load of stuff, but I have a bad feeling that this is re-compiling my Qt for static builds... is this the case? - I really did not mean to do that. Can someone confirm what that actually does?
    Thanks!



  • damn..... and finally when I try the last command it fails ....noo :(

    command: qmake && mingw32-make -s

    here is the output:

    @C:\Qt\qt-creator-2.7.0-src>qmake && mingw32-make -s
    ./release\pluginmanager.o: file not recognized: File truncated
    collect2.exe: error: ld returned 1 exit status
    Makefile.Release:112: recipe for target '......\lib\qt
    mingw32-make[3]: *** [......\lib\qtcreator\ExtensionSy
    Makefile:34: recipe for target 'release' failed
    mingw32-make[2]: *** [release] Error 2
    Makefile:86: recipe for target 'sub-libs-extensionsystem
    mingw32-make[1]: *** [sub-libs-extensionsystem-make_firs
    makefile:40: recipe for target 'sub-src-make_first-order
    mingw32-make: *** [sub-src-make_first-ordered] Error 2@

    pluginmanager.o does exist here: C:\Qt\qt-creator-2.7.0-src\src\libs\extensionsystem\release

    I think I am running out of ideas.... should it not be simple to build this qt creator project. How are other people doing it?

    Any further advice appreciated


  • Moderators

    It should be fairly easy. It wasn't an issue for me end of last year.
    qt creator was still based on 4.74, IIRC. I simply downloaded Qt creator 2.6.0 and followed the instructions and linked with my Qt 4.8.3(?) version which was readily compiled with MinGW already. So, I was skipping all stuff related to Qt lib compilation.
    Unfortunately, I do not use Qt 5 yet. Otherwise I would try to do a creator compilation myself. Maybe I have a look with Qt4.8.4 over the weekend.

    How did you solve the MAKEFILE_GENERATOR problem?
    Was it simply by following the recipe?



  • Yeah the make file gen issue... basically I located where qmake is (for me it is slightly different, perhaps a change in qt5).

    Then I installed active state python.

    Then I removed the path of where "sh.exe" is located. I ended up with a batch file like this:

    @@echo off
    set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\tools\MinGW\msys\1.0\bin;
    set PATH=C:\Perl\site\bin;C:\Perl\bin;C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin;C:\Qt\Qt5.0.2\Tools\MinGW\bin;C:\Qt\Qt5.0.2\Tools\QtCreator\creator\bin;C:\Qt\Qt5.0.2\5.0.2\Src\qtbase;%PATH%
    echo %PATH%
    set QMAKESPEC=win32-g++
    cd C:\Qt\qt-creator-2.7.0-src
    cmd@

    Where I took advice from earlier to clean out the PATH so it has only what I need. Then that issue went away :)

    Maybe I can find a clean machine later and try with older Qt versions, but the idea for me was to make doxygen work with qt sdk 5.0.2 (therefore qt 5.0.2 / qtcreater 2.7.0), so going back to qt 4 for me would defeat my goal :o


  • Moderators

    Well, I shy away from changing to Qt5 yet. Never change a running configuration :D As long as Qt 4.8.4 works fine I do not see a reason. AFAIK Qt creator has been compiled and linked for/with Qt 5, so you are not the first one.
    I am really wondering what the issue could be.



  • koahnig... don't be so shy please! ...lol
    Thanks for your help, really appreciate it. I will continue this in the background and try on a fresh PC. Its maybe worth trying the Qt4 just so that I can go through the process and see it work / get more experience... I'll leave the post open until I give up :o ... or succeed :)


  • Moderators

    Well, the issue is, if you start to change it looks easy at the start, but cost you a lot of hair at the end. The change from Qt4.8 to Qt 5 is not a minor sugery.
    Therefore, I shy away to change. Better shy than sorry :D



  • ...hey... what keeps happening to my posts?, I have re-written my list of instructions 2 times!, and koahning you replied to one of them... and even that is gone. Have we reached the max limit of the number of pages?


  • Moderators

    There is no max number of pages AFAIK.
    You are right my reply from this morning is gone as well.
    Do you write a bug report on this strange thing?

    It is not the first time I wondered what happened.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.