Need help in making simple mobile app



  • hi

    i am following this link "Your text to link here...":http://doc.qt.nokia.com/qtcreator-2.0/creator-mobile-example.html#declaring-the-qt-mobility-api to create a BatteryIndicator app. When i run my code it displays this error
    @
    Running build steps for project BatteryIndicator...
    Configuration unchanged, skipping qmake step.
    Starting: "C:/NokiaQtSDK2/QtCreator/bin/jom.exe"
    'cmd' is not recognized as an internal or external command,

    operable program or batch file.

    jom 0.9.4 - empower your cores

    command failed with exit code 1

    The process "C:/NokiaQtSDK2/QtCreator/bin/jom.exe" exited with code %2.
    Error while building project BatteryIndicator (target: Qt Simulator)
    When executing build step 'Make'
    @

    here is my code

    BatteryIndicator.pro
    @
    #-------------------------------------------------

    Project created by QtCreator 2010-10-20T14:42:42

    #-------------------------------------------------

    QT += core gui

    TARGET = BatteryIndicator
    TEMPLATE = app

    SOURCES += main.cpp
    batteryindicator.cpp

    HEADERS += batteryindicator.h

    FORMS += batteryindicator.ui

    CONFIG += mobility
    MOBILITY = systeminfo

    symbian {
    TARGET.UID3 = 0xecbd72d7
    # TARGET.CAPABILITY +=
    TARGET.EPOCSTACKSIZE = 0x14000
    TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }
    @

    BatteryIndicator.h
    @
    #ifndef BATTERYINDICATOR_H
    #define BATTERYINDICATOR_H

    #include <QDialog>
    #include <QtSystemInfo/QSystemInfo>

    QTM_USE_NAMESPACE

    namespace Ui {
    class BatteryIndicator;
    }

    class BatteryIndicator : public QDialog
    {
    Q_OBJECT

    public:
    explicit BatteryIndicator(QWidget *parent = 0);
    ~BatteryIndicator();

    private:
    Ui::BatteryIndicator *ui;
    void setupGeneral();

    QSystemDeviceInfo *deviceInfo;
    

    };

    #endif // BATTERYINDICATOR_H
    @

    BatteryIndicator.cpp
    @
    #include "batteryindicator.h"
    #include "ui_batteryindicator.h"

    BatteryIndicator::BatteryIndicator(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::BatteryIndicator),
    deviceInfo(NULL)
    {
    ui->setupUi(this);
    setupGeneral();
    }

    void BatteryIndicator::setupGeneral()
    {
    deviceInfo = new QSystemDeviceInfo();
    ui->batteryLevelBar->setValue(deviceInfo->batteryLevel());

    connect(deviceInfo, SIGNAL(batteryLevelChanged(int)), ui->batteryLevelBar, SLOT(setValue(int)));
    

    }

    BatteryIndicator::~BatteryIndicator()
    {
    delete ui;
    }
    @

    main.cpp
    @
    #include <QtGui/QApplication>
    #include "batteryindicator.h"

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    BatteryIndicator w;
    #if defined(Q_WS_S60)
    w.showMaximized();
    #else
    w.show();
    #endif

    return a.exec&#40;&#41;;
    

    }
    @

    how can i solve this problem? please help



  • @
    'cmd' is not recognized as an internal or external command,
    @

    @
    The process "C:/NokiaQtSDK2/QtCreator/bin/jom.exe" exited with code %2.
    Error while building project BatteryIndicator (target: Qt Simulator)
    When executing build step 'Make'
    @

    Read the error outputs, this error is not related with your code - The building itself not even started!

    I think there is something wrong in your environment, essential commands seems out of the PATH environment variable (the same thing applies to your "other post":http://developer.qt.nokia.com/forums/viewthread/1364/).

    BTW, can you build anything successfully in this environment?



  • well i ran builtin examples which successfully ran. i mean when i install nokia qt sdk i first ran example which are on welcome screen and ran successfully.
    how can this problem be solved?



  • the path variable in env.txt is set to
    @
    Path=C:\NokiaQtSDK2\Symbian\SDK\bin;C:\NokiaQtSDK2\Symbian\SDK\perl\bin;C:\NokiaQtSDK2\Symbian\SDK\epoc32\tools;C:\NokiaQtSDK2\Symbian\SDK\epoc32\gcc\bin;C:\NokiaQtSDK2\Symbian\gcce\arm-none-symbianelf\bin;C:\NokiaQtSDK2\Symbian\gcce\bin;C:\cygwin\bin;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell
    @

    it this correct? or is there any problem with this


Log in to reply
 

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