Qt Eclipse Integration plugin, support



  • I tried Eclipse integration plugin. Not only because I like Eclipse IDE very much, but because of ugliness and primitiveness of Qt Creator. (I'm wondering why some people praise it.) I think many will agree with me and I would like to share my little experience relating to dealing with this plugin. I suffered for two days, trying to accommodate it to my complex project. I hope developers will fix these issues somewhen.

    1. Synchronization of eclipse include/sources/... paths and project .pro file paths.
      When importing Qt project include/sources paths from .pro file don't importing in eclipse automatically. But plugin parses them because I found them in "Discovered scanner configuration container" while adding them manually. There are preprocessor symbols from gcc can be added also manually. I understand that .pro file could be very complicated conditional script and it's hard to process it, but it could be optionally to process simple root directives INCLUDEPATH and SOURCES. Also plugin doesn't support adding separate sources, but source folders only.
      In backward direction it working even worse. Since I did manual changes in .pro file and added linking resources for external source folder (with filter for needed source files) plugin annoying me with few dialogs every time I build project. It says that cannot find some removed files and offers me manually edit .pro file. No matter if I press Ok or Cancel. I didn't found any option turning off this feature. If there are other ways to make eclipse index external sources for my project without such conflict, please explain me.
    2. Specifying custom build directory causes abnormal build errors. Qt 4.7.0 itroduced building in sibling dir for selected target with naming them, for example, <project_name>-build-desktop. I would like to build same way in eclipse.
    3. Standart library headers (additionally to Qt's ones) such as stlib.h, stdint.h string.h, etc. aren't included in eclipse paths. One must manually add mingw include dir (example, C:\Qt\2010.05\mingw\include).
    4. Debugging found being the most hard issue.
    • Error "gdb: unknown target exception 0xc0000135 at 0x770d9eed. You can't do that without a process to debug." All needed paths is ok, otherwise further features I've checked would not work. The only things that helped me was adding mingw dir to system paths and running eclipse directly (still with -clean argument) bypassing bat-file.
    • Debugging stops at main (as it should do with default debug configuration) and says "No source available for main()". Other files being debugged fine. Looks like some boundary issue between "debugless" qt_winmain and my main.cpp. I unchecked "stop on startup at: main" option and placed breakpoint on first line in main(). It worked ok. And, of course , I compile with "-g -O0".
    • Default process launcher for created "C/C++ Application" debug configuration is GDB (DSF). It doesn't support global variables list (at least for now). "Add global variables" in Variables window is inactive. I selected Standart launcher which additionally allows select debugger type, gdb command set, protocol and verbose console mode. But it listed a few unknown variables bounding with "_". However moving with mouse on any global variable in editor shows it value.
    • Option "Use full file path to set breakpoint" causes timeout error.
    • Options "Load shared library symbols automatically" and "Stop on shared library events" should be unckecked by default because they lead to ntdll!ldrAccessResource() stopping debugging with "no source available ...".

    I googled these issues and tried proposed workarounds. Some of them helped me, some didn't.

    I'm using:
    OS: WinXP SP2
    Eclipse Helios Build 20100617-1415
    Qt 4.7.0 (standard mingw build from site)
    qt-eclipse-integration-win32-1.6.1



  • So far I am unable to make a connection between your initial statement about your prefered woking environment and the following list of basic tasks you were unable to complete. Would you like to elaborate?



  • I need flexible environment with high level of "automation" :) I'll explain in more detail what I wanted and exactly what came of it.
    I have Qt project for PC (Project1) and some other non-qt project for ARM platform (Project2) which share some headers and sources. Of course, in both projects I #include headers without specifying path, so I need to specify their locations in compiler include path options. For Qt it's INCLUDEPATH variable in .pro file. Yet another thing, I'm a supporter of relative paths.

    !http://img705.imageshack.us/img705/9365/sshot1gb.jpg(dir structure)!

    The only way I found to index shared files in eclipse (to make possible eclipse features work on these files) and automatically synchronize them with project1.pro file is Linked Resources mechanism with Resource Filters. I've done a lot of experiments with resource filters and found them don't work as expected. There are abridged version of my "experiments".
    First of all, not all options/features of eclipse and qt plugin, particularly, support relative paths. Here I was lucky. I've created path variable Project2 with value "..\Project2" (it turned to "${PROJECT_LOC}..\Project2") which succesfully resolved to valid path.

    I've added Folder to project by selecting "Link to alternate location (Linked folder)" and specifying that variable. Right there I clicked Resource filters and created "Include only" filters:

    1. Include only, Files, Name matches "header9.h"
    2. Include only, Files, Name matches "source9.cpp"
    3. Group AND, include only, files
      3.1. Name matches "header3.h"
      3.2. Location matches "dir1"
      ....
      As a result, was added whole content (folders and files) of project1 directory, excluding filtered files in root. I've edited filters:
    4. Include only, Files, Name matches "header9.h"
    5. Include only, Files, Name matches "source9.cpp"
    6. Include only, Folders, Name matches "dir1"
      As a result, was added header9.h, source9.cpp and dir1 with its content. I don't understand any logic. Ok, go ahead:
    7. Include only, Files, Name matches "header9.h"
    8. Include only, Files, Name matches "source9.cpp"
    9. Exclude all, Folders, Name matches "*"
      As a result, it worked as expected: only these files was added ! Lets name it "successful rule set". Note that, if change rule #3 to "Files and folders", it doesn't work ! (Also "All children (resursive)" doesn't matter checked or not.)
      Ok. I've added group filters to other files I need, but it still doesn't work. I've played with combinations of location, relative project path, and various values ("dir1", "..\Project2\dir1", "Project2\dir1"). No success.
      I've noted that edition of already added resource filters confused those part of qt plugin which catches eclipse project editions and adds/removes entries in .pro file. It somehow lost orientation and after Refresh operation says that it confused and offers me to manually edit .pro file. It adds duplicate entries. And each time I fixing and doing refresh action again (or editiong filters) they grows. Since that I'm not able to achieve correct behavior although linked resource content (displayed in project explorer but doesn't matched filters) and .pro file content matches. Restart of eclipse doesn't help. I have to delete linked resource from project and to start all over again.
      Ok, it's too early to give up ! Go ahead :) Lets make nested linked resources. I've added linked resource Project2 with filters for header9.h, source9.cpp with "successful rule set". Ok. Then I've tried to add linked resource Project2 extended to dir1, specifying Project2 folder as parent (now that folder already is part of workspace project) with "successful rule set" for corresponding files in dir1. Offered folder name is dir1. Ok. Eclipse warning me: "Location 'D:\dir\Project2\dir1' may overlap another resource. This can cause unexpected side-effects.". He's right. Nothing venture, nothing gain :) I've pressed Finish. Qt plugin popped up and offered not those changes I expected. Further, he gave out an error: "Resource '/Project1/Project2/dir1' already exists". It's a pity I can't answer him: "But it filtered !". As a result, eclipse project explorer contains what I expected (hmmm... dir1 folder icon isn't linked resource icon). But qt plugin added whole content of dir1 to .pro file. It confused again. So, attempt failed.

    Never give up! I've removed linked resource and tried again. This time I selected Project1 as parent folder for dir1 and renamed dir1 to Project2_dir. Hooray ! I won !!! Project explorer content:

    !http://img35.imageshack.us/img35/4885/sshot2i.jpg(resulted project explorer content)!

    I still have to remove and add folder if I need add or remove files from it.

    Another bad thing. Qt plugin removes INCLUDEPATH variable each time it offer changes. I cheat it with this trick: @FORCEINCLUDEPATH = ../Project2 ../Project2/dir1 ../Project2/dir2
    CONFIG += qt_eclipse_plugin
    qt_eclipse_plugin:INCLUDEPATH += $$FORCEINCLUDEPATH
    @

    And another one. After importing existing eclipse qt project manually added include paths in "C/C++ Include Paths and Symbols" project settings are lost.

    And I want a list of global variables in debug session.



  • stop on startup at: main
    modify
    stop on startup at:qmain


  • Moderators

    Please use the "bug tracker":https://bugreports.qt-project.org/ for things that you want somebody to look into.

    Where did you find the eclipse plugin by the way? It is not even available at ftp.qt-project.org anymore AFAICT.



  • Three years have passed. Unfortunatelly, that good initiative was died. This topic may be closed, of course.


Log in to reply
 

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