Error in compiling helloworld program

  • 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/ -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");

    return app.exec();


    please help why it is not working?

  • Your "hello world" code is correct.

    Is it Windows Vista? "More people": 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.

  • 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.

  • ok i am waiting for your post. thanks

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

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

  • 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...

    g++: no input files

Log in to reply

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