Author Topic: Cross-compiler Setup - Please Help  (Read 4650 times)

Orchid

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://www.cattail.nu
Cross-compiler Setup - Please Help
« on: July 24, 2005, 08:45:25 am »
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: [Select]
#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"):
Code: [Select]
#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:
Code: [Select]
# 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:
Code: [Select]
# 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_Setup

Has anyone seen the above error and know how to fix it?  Any help would be very much appreciated.  Thanks!
6000L
Sharp ROM Version 1.12
Sandisk 1 GB
Pocketop Keyboard
Jeode 1.10.7

guylhem

  • Hero Member
  • *****
  • Posts: 577
    • View Profile
Cross-compiler Setup - Please Help
« Reply #1 on: July 28, 2005, 08:45:37 am »
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

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
Cross-compiler Setup - Please Help
« Reply #2 on: July 28, 2005, 11:28:48 am »
Sounds like you are using an old toolchain on a recent distribution. That's tough. Try installing libstdc++.so.5 to make moc working.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

Orchid

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://www.cattail.nu
Cross-compiler Setup - Please Help
« Reply #3 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!

 
6000L
Sharp ROM Version 1.12
Sandisk 1 GB
Pocketop Keyboard
Jeode 1.10.7