Results 1 to 4 of 4

Thread: Passing arguments to compiler

  1. #1
    Join Date
    Nov 2013
    Location
    Chandigarh, India
    Posts
    62
    Thanks
    8
    Thanked 11 Times in 7 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Passing arguments to compiler

    Is it possible to pass arguments to the gcc compiler from a gui app? e.g some text from a textedit to the compiler. Can anyone suggest some way to do this?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Passing arguments to compiler

    For arguments see the QStringList argument of QProcess::start()

    For content you have to check if the target exectuable can read from stdin or if it needs a file. In the first case see QProcess:write(), in the second case see QTemporayFile

    Cheers,
    _

  3. #3
    Join Date
    Nov 2013
    Location
    Chandigarh, India
    Posts
    62
    Thanks
    8
    Thanked 11 Times in 7 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Passing arguments to compiler

    @anda_skoa, Can you please help me with some code? I am relatively new to Qt....

  4. #4
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Passing arguments to compiler

    Start here , check the "Running a Process" section, there is an example included.

Similar Threads

  1. Passing arguments
    By papillon in forum Qt Programming
    Replies: 3
    Last Post: 8th August 2012, 23:44
  2. Replies: 1
    Last Post: 7th September 2010, 15:49
  3. Replies: 12
    Last Post: 7th September 2010, 12:53
  4. Replies: 1
    Last Post: 3rd February 2010, 04:45
  5. passing arguments in SLOT
    By eleanor in forum Qt Programming
    Replies: 3
    Last Post: 3rd July 2008, 21:55

Tags for this Thread

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.