Can I use Qt Creator IDE for C++ programming?



  • Hi guys,

    I don't have a C++ compiler (say, VS) installed on my Windows machine, but Qt Creator 4.2.1 (Community). My question is that, can I use it instead of, for example, VS compiler?

    I VS, if I write a code like the following:

    #include <std_lib_facilities.h>
    int main()
    {
            cout <<"OK\n";
    	keep_window_open();
    	return 0;
    }
    

    It would show the massage OK and would keep the window for a user response.
    Can I have these facilities using Ct Creator IDE?



  • @tomy said in Can I use Qt Creator IDE for C++ programming?:

    Can I have these facilities using Ct Creator IDE?

    The IDE part is the important one. Qt Creator is just an IDE, it doesn't integrate a compiler as Visual Studio does. You'll need an external compiler to actually build and debug the program.

    • On windows, Qt installation gives you the option to also install MinGW compiler or you can use the MSVC build tools
    • On linux most distribution come with gcc already installed
    • Unsure on Mac, the "standard" compiler is called llvm but I never had enough money for a Mac computer so I'm unsure how to install it


  • Thanks.
    I have the MinGW compiler, I think. How to launch and use it, for example, for that simple code above?
    PS: I use Windows.



  • @VRonin said in Can I use Qt Creator IDE for C++ programming?:

    • Unsure on Mac, the "standard" compiler is called llvm but I never had enough money for a Mac computer so I'm unsure how to install it

    the recommanded way is to install Xcode, it's part of the macOS-Essentials. You can find it in the App store for free.



  • @tomy said in Can I use Qt Creator IDE for C++ programming?:

    I have the MinGW compiler, I think.

    If you do and Qt Creator can find it you'll see it in Tools > Options > Build & Run > Kits under auto detect. if that's the case then you are ready to roll.

    Take a look at http://doc.qt.io/qtcreator/creator-getting-started.html


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.