Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Configure script says C++14 support is not available



  • I want to know why it says C++14 support isn't available. Does it mean it's not available in GCC? And if so, and since my VS 2019 has support for C++17, how can I get it to use VS and its support for C++17? And I have Python 2 and 3, as well as zlib installed. Is it possible to specify the path to Python 2 when configuring it, or do I absolutely have to put my Python 2 installation above the Python 3 one in the PATH variable? And I also need to know how to specify the path to my zlib installation.

    One more question: is it okay for me to follow the directions to build Qt5 on Windows if I download Qt version 5.13 to get Qt5 for WebAssembly? Thanks.


  • Moderators

    @DragonOsman said in Configure script says C++14 support is not available:

    I want to know why it says C++14 support isn't available.

    Because the configure script asked your compiler what C++ features it supports, and the compiler reported that certain C++14 features are missing (or disabled).

    Does it mean it's not available in GCC?

    Which version?

    C++14 support is enabled by default in GCC 6.1 and newer: https://gcc.gnu.org/projects/cxx-status.html#cxx14

    And if so, and since my VS 2019 has support for C++17, how can I get it to use VS and its support for C++17?

    Delete all the configuration output files. Then, use your Developer Command Prompt for Visual Studio 2019 to run the configure script.

    Is it possible to specify the path to Python 2 when configuring it, or do I absolutely have to put my Python 2 installation above the Python 3 one in the PATH variable?

    You must set the PATH environment variables before running the configure script.

    P.S. May I ask why you want to use Python 2 and not Python 3?

    And I also need to know how to specify the path to my zlib installation.

    I'm not sure about this one.



  • I did use the Developer Command Prompt for VS 2019. In Elevated mode so that I don't run into trouble when it comes to installing to the Program Files directory. It wouldn't surprise me too much if some C++14 features were off, but they did say that support for C++14 and 17 was already complete in both VS2017 and VS2019. They also have a standards conformance mode which is now the default setting.

    Where are the configuration files, exactly?

    I asked about Python 2 because the configure script gave a warning about some module that won't be available without Python 2. I do want to use Python 3.

    If I install the binaries directly, will they give me WebAssembly support out of the box? In the documentation for Qt5 for WebAssembly, it says to install the binaries and mentions the option to build it from sources as an alternative. Is it okay to assume that this means the binaries also have support for WebAssembly? I'm trying to install version 5.13.1 of Qt.

    I installed version 8 of MinGW by the way.



  • @DragonOsman said in Configure script says C++14 support is not available:

    If I install the binaries directly, will they give me WebAssembly support out of the box? In the documentation for Qt5 for WebAssembly, it says to install the binaries and mentions the option to build it from sources as an alternative. Is it okay to assume that this means the binaries also have support for WebAssembly? I'm trying to install version 5.13.1 of Qt.

    You can choose the WebAssembly binaries with the Maintenance tool or online installer for Qt 5.13.1

    You will still have to use the commandline to build, until proper support is implemented in QtCreator (soon).



  • I installed the binaries using the online installer for v5.13.1, but didn't see an option for WebAssembly. How can I get to the Maintenance tool?


  • Lifetime Qt Champion

    @DragonOsman said in Configure script says C++14 support is not available:

    How can I get to the Maintenance tool?

    It resides in your Qt installation, e.g. C:\Qt.

    Regards



  • I found the Maintenance Tool and am trying to use it, but there's really nothing there about WebAssembly. Will I get it if I install the "Archive" component along with Qt version 5.13.1? Or did I install the wrong version?

    Could it be that WebAssembly support isn't available to those who install Qt with an account that has an open source license attached to it? Because that's what I have. It'd be great if my installation of Qt already has Wasm support included by default, though.

    Edit: Actually I can see a WebAssembly Kit mentioned in the Kit Selection part of the project creation process in Qt Creator. It's just that that it couldn't start clangbackend.exe for some reason, when the IDE initially started up. And it also reported that the C and C++ compilers are in different locations and that the C compiler may not work. I'll mainly use C++, but this is still a little worrisome.



  • I'd like some help with what I said in the above message, but aside from that I think this issue is pretty much solved.

    Though I'd like to know what modules to build and what flags or commands to pass when I do try to build Qt from source again. If I do. Thanks.


  • Qt Champions 2019



  • I installed Qt version 5.13.1 using the online installer and I have Wasm support out of the box (I don't know what libraries to link against, though, so I can't build anything yet--I did manage find the library directory though). I'm just having issues with building the Notepad app that the first Getting Started tutorial on the Qt website talks about. And I also don't know how to get Qt Creator to detect my VS 2019 installation (it's in the default location by the way). It only uses up to VS 2017 and I only have the Built Tools for that version. I don't have the actual IDE along with that. Qt Creator tries to set the environment to x86 for VS 2017 but it can't so it shows an error about it.

    Edit: For some reason, I can't set the layout for the Text Edit widget anymore in Qt Creator. I could before when I first started using it. I don't know what happened. I'll see if I can do a System Restore to fix it maybe.

    Edit2: Okay, never mind. I can't go back to that point. I hope there are other ways to fix this.


  • Moderators

    @DragonOsman said in Configure script says C++14 support is not available:

    I also don't know how to get Qt Creator to detect my VS 2019 installation (it's in the default location by the way). It only uses up to VS 2017 and I only have the Built Tools for that version.

    Visual Studio 2019 contained a critical bug which made it unusable for many graphical calculations. It was only fixed yesterday: https://developercommunity.visualstudio.com/content/problem/547684/visual-studio-20191602-generator-incorrect-code-wi.html I recommend you upgrade to the latest version as soon as possible.

    The next version of Qt and Qt Creator can now support VS 2019 properly.

    I don't have the actual IDE along with that. Qt Creator tries to set the environment to x86 for VS 2017 but it can't so it shows an error about it.

    You shouldn't need the Visual Studio IDE. The Build Tools should work fine (for Desktop builds, at least... I haven't checked WASM)

    Also, libraries built with VS 2017 can be used with the VS 2019 compiler.

    Create a new Kit that uses the Qt libraries for VS 2017 but select your VS 2019 compiler: https://doc.qt.io/qtcreator/creator-targets.html



  • I updated my VS 2019 IDE just yesterday. I hope I can make it work now.

    When following the Getting Started tutorial for making a Notepad app, I encountered an issue where when I add the menu items it says to add, I don't get five new lines appear in the Action Editor like the tutorial says I should. I had to click on them to get a dropdown menu with another "Type Here" where I typed the names of the menu items again. But this gave me one action for each menu, so I have six now instead of five. Did I do something wrong?

    When I right click on the actions, click on "Go to slot" and then click "triggered", the function name I get also looks different. For example, the full function signature for the "New" action is: void Notepad::on_actionNew_triggered(). On the tutorial it has void Notepad::newDocument(). I'm a bit confused.

    And I also have an error in Notepad::on_actionOpen_triggered() that says that QFileDialog is an undeclared identifier. The error is from the MSVC 2017 compiler.

    How do I define the function for printing a file after enabling support for that in the .pro file? The tutorial talks about it but doesn't show the code. I'll try to define it myself and ask about it here if I come across a problem. I'll also define the functions that use QFileDialog for now but I'll wait for word from you guys on how to fix the error message before I try to build the project. Thanks in advance.

    Edit: The tutorial for some reason doesn't say to do this; I added #include lines for QFileDialog and QFile below the ones for notepad.h and notepad_ui.h. The error of course went away with that.

    Edit2: Okay, how do I get the buttons and stuff for these actions?

    connect(ui->actionCopy, &QAction::triggered, this, &Notepad::copy);
    connect(ui->actionCut, &QAction::triggered, this, &Notepad::cut);
    connect(ui->actionPaste, &QAction::triggered, this, &Notepad::paste);
    connect(ui->actionUndo, &QAction::triggered, this, &Notepad::undo);
    connect(ui->actionRedo, &QAction::triggered, this, &Notepad::redo);
    connect(ui->actionFont, &QAction::triggered, this, &Notepad::selectFont);
    connect(ui->actionBold, &QAction::triggered, this, &Notepad::setFontBold);
    connect(ui->actionUnderline, &QAction::triggered, this, &Notepad::setFontUnderline);
    connect(ui->actionItalic, &QAction::triggered, this, &Notepad::setFontItalic);
    connect(ui->actionAbout, &QAction::triggered, this, &Notepad::about);
    

    And how do I add the functionality for them? It seems like an advanced topic, but still.

    Edit3:
    Note: I'm using C++17 and braced initialization.

    In the method Notepad::on_actionPrint_triggered, I have this:

    QPrinter printer{QPrintDialog};
    

    but I don't know what method of QPrintDialog to use here and the tutorial isn't clear about it either. Thanks in advance for any help.



  • This post is deleted!


  • Okay, never mind; I just remembered that those other action functions are already shown earlier on in the tutorial. I'll just look at those. What about the menu items/buttons for selecting a font, and for "undo", "redo", "cut", "copy" and "paste". How do I make those? The same as for the others or something different?


  • Moderators

    @DragonOsman said in Configure script says C++14 support is not available:

    What about the menu items/buttons for selecting a font, and for "undo", "redo", "cut", "copy" and "paste". How do I make those? The same as for the others or something different?

    Are you doing this tutorial?: https://doc.qt.io/qt-5/qtwidgets-tutorials-notepad-example.html I think that tutorial needs lots of improvement.

    But anyway, see https://doc.qt.io/qt-5/designer-creating-mainwindows.html# for creating menus



  • I managed to get it working. I just need to know how I can get Emscripten to generate the notepad_ui.h header file from the uic file. For now I built it from within Qt Creator itself using the MSVC 2017 compiler, but I do want to know how to do it with Emscripten from the command line.

    I also created the menus in such a way that clicking them gives you a dropdown with one item with the same text as the button where you have to click the dropdown to perform the action. Is there a way to do it without needing to create the dropdown?

    Also, how do I change the configuration from Debug to Release?

    Edit: I changed it to Release mode just fine so never mind that.

    Anyway, although I can build it just fine in Qt Creator, trying it with Emscripten on the command line keeps failing. I get exceptions from the Emscripten script. If Qt developers can help with this, maybe I should open a new issue asking for help on building Qt apps to Wasm.

    And for some reason, when running the app, I have to choose a font twice from the font selection dialog box when I click on the menu button for selecting a font. I also don't understand why it won't just create an action in Action Editor the moment I create a menu item. Why do I have to click on the "Type here" that comes up when I click on that and create another menu item there for the same action for it to work?


Log in to reply