Help - Search - Members - Calendar
Full Version: Cross-compiler Setup - Please Help
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > Qt/Qtopia
Orchid
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:
CODE
#include <iostream.h>
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"):
CODE
#include <qmainwindow.h>
#include <qpe/qpeapplication.h>

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:
CODE
# more FrmMain.h
#include <qmainwindow.h>
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 <qpopupmenu.h>
#include <qmenubar.h>
#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 <qmainwindow.h>
#include <qpe/qpeapplication.h>
#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:
CODE
# 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:
http://www.oesf.org/index.php?title=Compiler_Setup

Has anyone seen the above error and know how to fix it? Any help would be very much appreciated. Thanks!
guylhem
Please try to use the toolchain and libs (Embedix and Qtopia) from externe.net. I use them daily - they work. Can't help you with anything else :-(
Mickeyl
Sounds like you are using an old toolchain on a recent distribution. That's tough. Try installing libstdc++.so.5 to make moc working.
Orchid
Thanks for the responses! Now all I need are 2-3 more hours in each day so I can play with it!

smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.