Results 1 to 3 of 3

Thread: Pre-processor Settings

  1. #1
    Join Date
    Jun 2011
    Posts
    203
    Thanks
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Pre-processor Settings

    I had a look through Tools->Options but I couldn't find any options for generating output after the pre-processor step to see what the outcome of that step is. Is there an option somewhere that I missed or does Qt not have this option. On VS there is an option to produce a post processor file.

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

    Default Re: Pre-processor Settings

    Quote Originally Posted by Atomic_Sheep View Post
    I had a look through Tools->Options but I couldn't find any options for generating output after the pre-processor step to see what the outcome of that step is. Is there an option somewhere that I missed or does Qt not have this option. On VS there is an option to produce a post processor file.
    Qt is a set of libraries, not an IDE or compiler.

    I am going to guess you are attempting to compile on Windows using Microsoft's C++ compiler, in which case you need to pass the compiler the /P and possibly /C or /Fi options (-P) to get a foobar.i from your foobar.cpp. This option will terminate the compilation after pre-processing. This should be enough for debugging purposes.


    If you are using qmake to control your build then you can put these options in:
    Qt Code:
    1. QMAKE_CFLAGS += /P /C
    2. QMAKE_CXXFLAGS += /P /C
    To copy to clipboard, switch view to plain text mode 
    You might find the pre-processed output in the foobar.obj as a side-effect of the way qmake invokes the compiler

    If you are using a GCC compiler the equivalent option is -E. Options Controlling the Preprocessor

  3. #3
    Join Date
    Jun 2011
    Posts
    203
    Thanks
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Pre-processor Settings

    I always call Qt Creator Qt. I think you made the distinction clear now.

Similar Threads

  1. Arm processor support
    By mohamedzec in forum General Programming
    Replies: 1
    Last Post: 9th May 2014, 12:31
  2. Port Qt to ARC Processor
    By jim_king_2000 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 19th January 2010, 21:22
  3. high processor waste...
    By kernel_panic in forum Qt Programming
    Replies: 4
    Last Post: 9th June 2008, 23:12
  4. QProcess processor affinity
    By ibergmark in forum Qt Programming
    Replies: 1
    Last Post: 28th March 2008, 16:09
  5. Locking all threads to one processor
    By chuckshaw in forum Qt Programming
    Replies: 0
    Last Post: 3rd July 2007, 19:14

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.