Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Error in compiling helloworld program

    General and Desktop
    3
    7
    5048
    Loading More Posts
    • 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.
    • D
      doforumda last edited by

      hi
      i just download Nokia Qt SDK and install it when i try to run simple hello world program it displays this error
      @
      :: error: [main.o] Error 127
      @

      @
      Running build steps for project hello_world...
      Starting: "c:/nokiaqtsdk/maemo/4.6.2/targets/fremantle-1030/bin/qmake.exe" C:/Users/Administrator/Documents/hello_world/hello_world.pro -r -spec default -unix CONFIG+=debug
      The process "c:/nokiaqtsdk/maemo/4.6.2/targets/fremantle-1030/bin/qmake.exe" exited normally.
      Starting: "C:/nokiaqtsdk/maemo/4.6.2/bin/make.exe" -w
      make: Entering directory /c/Users/Administrator/Documents/hello_world' g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024 -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/share/qt4/mkspecs/default -I. -I../../../../NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/QtCore -I../../../../NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include/QtGui -I../../../../NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1030-slim/usr/include -I. -I. -o main.o main.cpp make: Leaving directory /c/Users/Administrator/Documents/hello_world'
      make: execvp: g++: Bad file number
      make: *** [main.o] Error 127
      The process "C:/nokiaqtsdk/maemo/4.6.2/bin/make.exe" exited with code %2.
      Error while building project hello_world (target: Maemo)
      When executing build step 'Make'
      @

      here is my code
      @
      #include <QtGui/QApplication>
      //#include "helloworld.h"
      #include <QLabel>

      int main(int argc, char *argv[])
      {
      QApplication app(argc, argv);
      QLabel *label = new QLabel("Hello World");
      label->show();

      return app.exec();
      

      }
      @

      please help why it is not working?

      1 Reply Last reply Reply Quote 0
      • A
        anselmolsm last edited by

        Your "hello world" code is correct.

        Is it Windows Vista? "More people":http://stackoverflow.com/questions/1352371/nsinstall-bad-file-number-error-on-vista complained about it trying to build Mozilla Firefox on Vista. It seems there is an issue with long absolute paths, check if it's your case.

        Anselmo L. S. Melo (anselmolsm)

        1 Reply Last reply Reply Quote 0
        • A
          anselmolsm last edited by

          Ops... wait, now I saw the error number in the output you posted :-P

          Well... the code you're trying to build still correct, the error is related with your build environment. I'll post here if I find something more conclusive.

          Anselmo L. S. Melo (anselmolsm)

          1 Reply Last reply Reply Quote 0
          • D
            doforumda last edited by

            ok i am waiting for your post. thanks

            1 Reply Last reply Reply Quote 0
            • L
              lyuts last edited by

              Please run
              @$ g++@
              in that shell and show us the output.

              I'm a rebel in the S.D.G.

              1 Reply Last reply Reply Quote 0
              • D
                doforumda last edited by

                i install Nokia SDK in Windows 7. do you mean in cmd? if yes then in which folder should i run g++?

                1 Reply Last reply Reply Quote 0
                • D
                  doforumda last edited by

                  ok i ran g++ on Nokia Qt SDK cmd which is in all programms>Nokia Qt SDK> Symbian Folder.

                  here is the output
                  Setting up environment for Qt usage...

                  C:\Windows\system32>g++
                  g++: no input files

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post