Results 1 to 9 of 9

Thread: How to invoke Mingw Compiler?

  1. #1
    Join Date
    Nov 2013
    Posts
    46
    Thanks
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default How to invoke Mingw Compiler?

    I have two projects X and Y. X is CodeEditor with Command Prompt and Y is Mingw Compiler. I want the result of C and C++ program (that are written on CodeEditor) will be shown on Command Prompt. Basically I want my CodeEditor will invoke C or C++ compiler (mingw) and output of the program(C or C++) will shown at Command Prompt. So I have two Queries:
    1. How CodeEditor will invoke Mingw?
    2. How to link CodeEditor with Command Prompt?

    Any ideas to understand these two invoking and linking queries?

  2. #2
    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: How to invoke Mingw Compiler?

    Are you aaditya190 ? You are posting very similar questions... Btw. your question is answered in linked threads.

  3. #3
    Join Date
    Nov 2013
    Posts
    46
    Thanks
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to invoke Mingw Compiler?

    Yes We both are Teammates that's why most of the times our questions are very much similar.Yes i already read these linked threads but i am new to qt creator, I am not able to understand these thread well. Can anyone ellaborate the concept of invoking a compiler and linking compiler both with CodeEditor and Command Prompt ?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to invoke Mingw Compiler?

    Quote Originally Posted by parulkalra14 View Post
    Yes We both are Teammates that's why most of the times our questions are very much similar.
    So why don't you continue your friend's threads instead of starting new ones on the same subject?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  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: How to invoke Mingw Compiler?

    I am not able to understand these thread well.
    If you are not able to read and understand the friendly manual about QProcess (as indicated in the linked threads) then you will be unable to complete the task before you. Read on to understand why.
    Can anyone ellaborate the concept of invoking a compiler and linking compiler
    • Send text to be compiled to a file (QFile)
    • Invoke compiler/linker with appropriate command line arguments using QProcess, or write a Makefile to file and invoke make with QProcess. Capture output from QProcess if you want to display the compiler output.
    • If you want to capture the output of running the compiled program (if there is one after compilation and linking) then run the compiled program with QProcess and capture output from QProcess.


    The code snippets in the QProcess manual are all you need to know to to launch a compiler, linker, make utility, or other arbitrary program. The manual provides the information you need to read any output from those programs.

    Nobody here is going to give you and your teammate a copy and paste solution to the problem of "develop a simple IDE" (whether for school or work). It is likely that you will receive answers to specific questions if you have them as a result of trying things after reading the friendly manual.

    As for the specific question in the thread title, "How to invoke Mingw Compiler?". The answer is, execute "gcc" or "g++" in a suitable environment and with suitable arguments.

  6. The following user says thank you to ChrisW67 for this useful post:

    parulkalra14 (15th January 2014)

  7. #6
    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: How to invoke Mingw Compiler?

    @Chrisw67 and @wysota, Thank you very much for your help. We have created a process that runs a batch file, and compiles the program (using g++) in the textedit and gives output. We are using plaintextEdit for both input and output. The problem we are facing is if we are using "\b" in a C-program, it doesn't work instead displays bullets in place of "\b". Can you suggest us some means so that "\b" can work??

  8. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to invoke Mingw Compiler?

    What is "\b"? How should it "work"? What does it have to do to invoking MinGW compiler?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #8
    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: How to invoke Mingw Compiler?

    @wysota, It has nothing to do with invoking. I am continuing the same thread instead of beginning a new one. "\b" is used for backspaces in a C-program. When the output containing "\b" is written to a txt file, "\b" displays bullets instead of backspaces. Can you help me out with this?

  10. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to invoke Mingw Compiler?

    Quote Originally Posted by aaditya190 View Post
    @wysota, It has nothing to do with invoking. I am continuing the same thread instead of beginning a new one.
    So start a new one if you have a different problem. This thread is not called "All problems of aaditya190".

    "\b" is used for backspaces in a C-program.
    Did you remember to escape the backslash

    When the output containing "\b" is written to a txt file, "\b" displays bullets instead of backspaces.
    It is the program you use for displaying the file that does that, not "the compiler".
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. msvc Compiler or mingw compiler
    By Ashutosh2k1 in forum Qt Programming
    Replies: 3
    Last Post: 14th February 2011, 08:33
  2. MinGW Compiler under WXP
    By Walsi in forum Newbie
    Replies: 2
    Last Post: 30th March 2007, 17:26
  3. Where do I can download mingw compiler?
    By Illuminnator in forum General Discussion
    Replies: 3
    Last Post: 25th February 2007, 06:55
  4. Loaded QT 4.1.1 and MinGW Compiler
    By Seth in forum Newbie
    Replies: 7
    Last Post: 8th July 2006, 15:03
  5. How to setup the Dev C++ with MingW compiler for QT?
    By gopik_g in forum Installation and Deployment
    Replies: 1
    Last Post: 4th June 2006, 08:19

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.