Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QtCreator demands iostream.h
Forum Updated to NodeBB v4.3 + New Features

QtCreator demands iostream.h

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 3 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rhnulm
    wrote on last edited by
    #1

    After complete new installation of Qt Creator 10 and Qt 6.5 on Windows11 I started a new widget project. Not changing any proposed name or file or folder. After setup of the projects by Qt I immediately tried to compile and got an error telling me
    "/include/iterator:37:10: fatal error: iostream.h: no such file or directory"
    In the error message "/include/iterator:37:10:" is a link (underlined) but when I click it an error occurs:" The binary editor cannot open empty files"
    However, found only one file on the entire hard drive having a line "#include <iostream.h" (etip.h in the ncursesw folder)
    Did not find any file named "iterator" (there are sub-directories, though)
    Who in the Qt-System is still using "iostream.h"???
    I am surely not the super professional in Qt but this seems very strange to my???

    JonBJ JoeCFDJ 2 Replies Last reply
    0
    • R rhnulm

      After complete new installation of Qt Creator 10 and Qt 6.5 on Windows11 I started a new widget project. Not changing any proposed name or file or folder. After setup of the projects by Qt I immediately tried to compile and got an error telling me
      "/include/iterator:37:10: fatal error: iostream.h: no such file or directory"
      In the error message "/include/iterator:37:10:" is a link (underlined) but when I click it an error occurs:" The binary editor cannot open empty files"
      However, found only one file on the entire hard drive having a line "#include <iostream.h" (etip.h in the ncursesw folder)
      Did not find any file named "iterator" (there are sub-directories, though)
      Who in the Qt-System is still using "iostream.h"???
      I am surely not the super professional in Qt but this seems very strange to my???

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @rhnulm
      Can you copy & paste the (whole of the) actual compiler output you should find in the Complier Output pane in Creator, in case there is some more information there about where this is being called from.

      You probably have two .cpp files, something like main.cpp & widget.cpp? Which of these is it compiling when you get the error? You could show whichever one's contents.

      R 1 Reply Last reply
      0
      • JonBJ JonB

        @rhnulm
        Can you copy & paste the (whole of the) actual compiler output you should find in the Complier Output pane in Creator, in case there is some more information there about where this is being called from.

        You probably have two .cpp files, something like main.cpp & widget.cpp? Which of these is it compiling when you get the error? You could show whichever one's contents.

        R Offline
        R Offline
        rhnulm
        wrote on last edited by
        #3

        @JonB
        The error message is:
        In file included from C:/Qt/6.5.0/mingw_64/include/QtCore/qcontainertools_impl.h:20,
        from C:/Qt/6.5.0/mingw_64/include/QtCore/qarraydataops.h:9,
        from C:/Qt/6.5.0/mingw_64/include/QtCore/qarraydatapointer.h:7,
        from C:/Qt/6.5.0/mingw_64/include/QtCore/qbytearray.h:11,
        from C:/Qt/6.5.0/mingw_64/include/QtCore/qstringview.h:8,
        from C:/Qt/6.5.0/mingw_64/include/QtCore/qchar.h:656,
        from C:/Qt/6.5.0/mingw_64/include/QtCore/qstring.h:14,
        from C:/Qt/6.5.0/mingw_64/include/QtCore/qobject.h:11,
        from C:/Qt/6.5.0/mingw_64/include/QtWidgets/qwidget.h:9,
        from C:/Qt/6.5.0/mingw_64/include/QtWidgets/qmainwindow.h:8,
        from C:/Qt/6.5.0/mingw_64/include/QtWidgets/QMainWindow:1,
        from debug../../untitled2/mainwindow.h:4,
        from debug\moc_mainwindow.cpp:9:
        /include/iterator:37:10: fatal error: iostream.h: No such file or directory
        37 | #include <iostream.h>
        | ^~~~~~~~~~~~
        The same message occurs for main.cpp and for mainwindow.h

        The sources are entirely untouched:

        main.cpp
        #include "mainwindow.h"

        #include <QApplication>

        int main(int argc, char *argv[])
        {
        QApplication a(argc, argv);
        MainWindow w;
        w.show();
        return a.exec();
        }

        mainwindow.h
        #ifndef MAINWINDOW_H
        #define MAINWINDOW_H

        #include <QMainWindow>

        QT_BEGIN_NAMESPACE
        namespace Ui { class MainWindow; }
        QT_END_NAMESPACE

        class MainWindow : public QMainWindow
        {
        Q_OBJECT

        public:
        MainWindow(QWidget *parent = nullptr);
        ~MainWindow();

        private:
        Ui::MainWindow *ui;
        };
        #endif // MAINWINDOW_H

        mainwindow.cpp
        #include "mainwindow.h"
        #include "ui_mainwindow.h"

        MainWindow::MainWindow(QWidget *parent)
        : QMainWindow(parent)
        , ui(new Ui::MainWindow)
        {
        ui->setupUi(this);
        }

        MainWindow::~MainWindow()
        {
        delete ui;
        }

        No clue what else to look???

        JonBJ 1 Reply Last reply
        0
        • R rhnulm

          @JonB
          The error message is:
          In file included from C:/Qt/6.5.0/mingw_64/include/QtCore/qcontainertools_impl.h:20,
          from C:/Qt/6.5.0/mingw_64/include/QtCore/qarraydataops.h:9,
          from C:/Qt/6.5.0/mingw_64/include/QtCore/qarraydatapointer.h:7,
          from C:/Qt/6.5.0/mingw_64/include/QtCore/qbytearray.h:11,
          from C:/Qt/6.5.0/mingw_64/include/QtCore/qstringview.h:8,
          from C:/Qt/6.5.0/mingw_64/include/QtCore/qchar.h:656,
          from C:/Qt/6.5.0/mingw_64/include/QtCore/qstring.h:14,
          from C:/Qt/6.5.0/mingw_64/include/QtCore/qobject.h:11,
          from C:/Qt/6.5.0/mingw_64/include/QtWidgets/qwidget.h:9,
          from C:/Qt/6.5.0/mingw_64/include/QtWidgets/qmainwindow.h:8,
          from C:/Qt/6.5.0/mingw_64/include/QtWidgets/QMainWindow:1,
          from debug../../untitled2/mainwindow.h:4,
          from debug\moc_mainwindow.cpp:9:
          /include/iterator:37:10: fatal error: iostream.h: No such file or directory
          37 | #include <iostream.h>
          | ^~~~~~~~~~~~
          The same message occurs for main.cpp and for mainwindow.h

          The sources are entirely untouched:

          main.cpp
          #include "mainwindow.h"

          #include <QApplication>

          int main(int argc, char *argv[])
          {
          QApplication a(argc, argv);
          MainWindow w;
          w.show();
          return a.exec();
          }

          mainwindow.h
          #ifndef MAINWINDOW_H
          #define MAINWINDOW_H

          #include <QMainWindow>

          QT_BEGIN_NAMESPACE
          namespace Ui { class MainWindow; }
          QT_END_NAMESPACE

          class MainWindow : public QMainWindow
          {
          Q_OBJECT

          public:
          MainWindow(QWidget *parent = nullptr);
          ~MainWindow();

          private:
          Ui::MainWindow *ui;
          };
          #endif // MAINWINDOW_H

          mainwindow.cpp
          #include "mainwindow.h"
          #include "ui_mainwindow.h"

          MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent)
          , ui(new Ui::MainWindow)
          {
          ui->setupUi(this);
          }

          MainWindow::~MainWindow()
          {
          delete ui;
          }

          No clue what else to look???

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @rhnulm
          Your Qt code looks fine. Looks more like a MinGW issue with locating headers, about which I know nothing. Someone who uses it might.

          Could you try to find the

          Can you copy & paste the (whole of the) actual compiler output you should find in the Complier Output pane in Creator

          Not the pane you have shown for the error message, the one which shows the command-line MinGW is being invoked via. Others may need to see if that is relevant for where the compiler looks for include files.

          1 Reply Last reply
          0
          • R rhnulm

            After complete new installation of Qt Creator 10 and Qt 6.5 on Windows11 I started a new widget project. Not changing any proposed name or file or folder. After setup of the projects by Qt I immediately tried to compile and got an error telling me
            "/include/iterator:37:10: fatal error: iostream.h: no such file or directory"
            In the error message "/include/iterator:37:10:" is a link (underlined) but when I click it an error occurs:" The binary editor cannot open empty files"
            However, found only one file on the entire hard drive having a line "#include <iostream.h" (etip.h in the ncursesw folder)
            Did not find any file named "iterator" (there are sub-directories, though)
            Who in the Qt-System is still using "iostream.h"???
            I am surely not the super professional in Qt but this seems very strange to my???

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by JoeCFD
            #5

            @rhnulm I guess you are using gcc/g++ to build your project on mingw_64. iostream.h is one of the most basic headers in C++. Did you install gcc/g++?

            JonBJ 1 Reply Last reply
            0
            • JoeCFDJ JoeCFD

              @rhnulm I guess you are using gcc/g++ to build your project on mingw_64. iostream.h is one of the most basic headers in C++. Did you install gcc/g++?

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @JoeCFD
              My limited MinGW understanding is the user shows C:/Qt/6.5.0/mingw_64 and that is supposed to be a complete MinGW g++ which comes in Qt installation that should just "work"?

              JoeCFDJ 1 Reply Last reply
              0
              • JonBJ JonB

                @JoeCFD
                My limited MinGW understanding is the user shows C:/Qt/6.5.0/mingw_64 and that is supposed to be a complete MinGW g++ which comes in Qt installation that should just "work"?

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by
                #7

                @JonB It does not matter whatever OS is. iostream.h has to be available. If not, C++ compiler is not installed.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved