I'm trying to set up a cross-compiler under Redhat for my 6000SL running the original Sharp ROM (updating to OpenZaurus is on my to-do list) with Qtopia 1.5.4, and am getting an error running moc. Can anyone help? Details below.
Using simple programs from
http://www.kevinboone.com/myfirstqtopiaapp1.html, I'm apparently missing something or have a wrong version of something.
The simple text based app compiles and runs:
#include
int main(int argc, char **argv)
{ cout << "Hello, world!\n"; }
The simple window compiles and runs, but exits with error ("could not open translation file /home/QtPalmtop//i18n/en/libs1.qmid"):
#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();
}
When I actually try to use moc, however, it fails. Here's the code:
# 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();
}
Here's the error:
# 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
I'm not sure how to find what versions of the various compiler/Qt pieces I have (read as: clueless newbie). I tried to follow:
https://www.oesf.org/index.php?title=Compiler_SetupHas anyone seen the above error and know how to fix it? Any help would be very much appreciated. Thanks!