Results 1 to 5 of 5

Thread: Parse compiler errors of a non gcc compiler

  1. #1
    Join Date
    May 2011
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Parse compiler errors of a non gcc compiler

    Hi,

    I like qtcreator very much and would love to use it as IDE for an embedded project. I already imported that project by doing "new project -> other project -> from existing project". Worked fine. All files found, cross references created. Next I added my project's own build and clean command. The project compiles.

    The only caveat: The compiler does not have the same output string pattern for errors and warnings like gcc. Thus qtcreator does not recognize the lines. No double click on error Usually, other multi-purpose IDEs let you define some regular expressions to catch the needed information. Somehow I was not able to find such a mechanism in qtcreator.

    Not possible? Me blind? Works completely different?

    I would really appreciate a solution for that to say good by to Eclipse.

    Thanks

    Oliver

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: Parse compiler errors of a non gcc compiler

    Nobody seems to know. I don't think it is possible and I think it is completely ok considering the purpose and goals of this IDE. Eclipse is really an exception here, even though it may be the most general-use ide ever.

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Parse compiler errors of a non gcc compiler

    Last time I did something like this I just piped the output from the compiler through a custom perl script which converted it to GCC-like output.

  4. #4
    Join Date
    May 2011
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Parse compiler errors of a non gcc compiler

    Hm, perl script. That's an idea. However I am not supposed to change makefile or build script. On the other hand side, who does what he is supposed to I'll give it a try.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Parse compiler errors of a non gcc compiler

    Here are some possible approaches:
    • Name your wrapper script the same as the compiler and make sure it is found in the PATH before the real compiler (relies on the Makefile just invoking the compiler without a path).
    • Set the CC environment variable to point at your wrapper script instead of the real compiler as many Makefiles honour this because they use default rules.
    • Capture the entire output of your make call in a temporary file then add a Qt Creator build step to post-process that file and output to stdout/stderr.

    Whether these work depends to a good degree on your your Makefile is written.

Similar Threads

  1. msvc Compiler or mingw compiler
    By Ashutosh2k1 in forum Qt Programming
    Replies: 3
    Last Post: 14th February 2011, 08:33
  2. compiler errors on Eclipse ??
    By frankieyam1 in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2011, 20:52
  3. Strange compiler behaviour (compiler passes wrong argument)
    By SasaVilic in forum General Programming
    Replies: 2
    Last Post: 2nd November 2010, 11:36
  4. Compiler
    By CHeader in forum Qt Programming
    Replies: 3
    Last Post: 10th April 2008, 15:45
  5. Weird compiler errors
    By MarkoSan in forum General Programming
    Replies: 13
    Last Post: 17th June 2006, 12:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.