Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error in compiling helloworld program
QtWS25 Last Chance

Error in compiling helloworld program

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 5.4k 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.
  • D Offline
    D Offline
    doforumda
    wrote on last edited by
    #1

    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
    0
    • A Offline
      A Offline
      anselmolsm
      wrote on last edited by
      #2

      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
      0
      • A Offline
        A Offline
        anselmolsm
        wrote on last edited by
        #3

        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
        0
        • D Offline
          D Offline
          doforumda
          wrote on last edited by
          #4

          ok i am waiting for your post. thanks

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lyuts
            wrote on last edited by
            #5

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

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

            1 Reply Last reply
            0
            • D Offline
              D Offline
              doforumda
              wrote on last edited by
              #6

              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
              0
              • D Offline
                D Offline
                doforumda
                wrote on last edited by
                #7

                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
                0

                • Login

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