1
Qt/Qtopia / Cross-compiler Setup - Please Help
« on: August 03, 2005, 02:29:24 pm »
Thanks for the responses! Now all I need are 2-3 more hours in each day so I can play with it!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#include
int main(int argc, char **argv)
{ cout << "Hello, world!\n"; }
#include
#include
int main(int argc, char** argv)
{
QPEApplication app(argc, argv);
QMainWindow* mainWindow = new QMainWindow();
mainWindow->setCaption("Hello, world!");
app.showMainWidget(mainWindow);
return app.exec();
}
# more FrmMain.h
#include
class FrmMain : public QMainWindow
{
Q_OBJECT
public:
FrmMain(QWidget* parent=0, const char* name=0, WFlags fl=0);
public slots:
void cmdFileQuit();
};
# more FrmMain.cpp
#include
#include
#include "FrmMain.h"
FrmMain::FrmMain(QWidget* parent, const char* name, WFlags fl)
: QMainWindow(parent, name, fl)
{
setCaption("Hello, World!");
QMenuBar *menubar = this->menuBar();
QPopupMenu *mnuFile = new QPopupMenu(this, "MenuFile");
menubar->insertItem("&File", mnuFile);
mnuFile->insertItem("&Quit", this,
SLOT(cmdFileQuit()), 0, 1);
}
void FrmMain::cmdFileQuit()
{ this->close(); }
# more hello3.cpp
#include
#include
#include "FrmMain.h"
int main(int argc, char** argv)
{
QPEApplication app(argc, argv);
QMainWindow* mainWindow = new FrmMain();
app.showMainWidget(mainWindow);
return app.exec();
}
# ls
FrmMain.cpp FrmMain.h hello3.cpp
# /opt/Embedix/tools/bin/arm-linux-g++ \
> -I /opt/Qtopia/sharp/include/ \
> -DQWS -fno-rtti -o FrmMain.o -c FrmMain.cpp
# /opt/Embedix/tools/bin/arm-linux-g++ \
> -I /opt/Qtopia/sharp/include/ \
> -DQWS -fno-rtti -o hello3.o -c hello3.cpp
# ls
FrmMain.cpp FrmMain.h FrmMain.o hello3.cpp hello3.o
# /opt/Qtopia/sharp/bin/moc -o FrmMain_moc.cpp FrmMain.h
/opt/Qtopia/sharp/bin/moc: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory