Results 1 to 3 of 3

Thread: adding gcc command line options in QT

  1. #1
    Join Date
    Oct 2013
    Location
    Bangalore,India
    Posts
    64
    Thanks
    21
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default adding gcc command line options in QT

    How can and where should I add gcc command line options in QtCreator?
    example:

    I want to run a program in QT which otherwise runs like this in terminal:
    Qt Code:
    1. gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config --cflags --libs gstreamer-0.10`
    To copy to clipboard, switch view to plain text mode 

    Where should I add the string `pkg-config --cflags --libs gstreamer-0.10` ??

  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: adding gcc command line options in QT

    For exmaple In the .pro file, using the system command
    http://qt-project.org/doc/qt-4.8/qma...system-command

    qmake even supports pkg-config directly: http://qt-project.org/faq/answer/doe...for_pkg-config

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    prkhr4u (29th January 2014)

  4. #3
    Join Date
    Oct 2013
    Location
    Bangalore,India
    Posts
    64
    Thanks
    21
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: adding gcc command line options in QT

    Thanks for the reply.I am using pkg-config directly and have added these two lines to my .pro file:
    Qt Code:
    1. CONFIG += link_pkgconfig
    2. PKGCONFIG += gstreamer-0.10
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Execute window command line-by-line using QProcess
    By nhocjerry in forum Qt Programming
    Replies: 5
    Last Post: 30th July 2013, 12:21
  2. Command for adding a plasmoid?
    By gosku in forum KDE Forum
    Replies: 1
    Last Post: 28th May 2011, 08:37
  3. QProcess and the command line
    By auba in forum Qt Programming
    Replies: 17
    Last Post: 27th May 2009, 10:39
  4. Printing to Command Line
    By seanmu13 in forum Qt Programming
    Replies: 3
    Last Post: 5th July 2007, 15:57
  5. Is there a command-line window in Qt4?
    By miaoliang in forum Qt Programming
    Replies: 2
    Last Post: 8th November 2006, 08:56

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.