![]() ![]() |
Jul 24 2005, 04:45 AM
Post
#1
|
|
|
Group: Members Posts: 5 Joined: 7-July 04 From: Maryland Member No.: 3,939 |
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! |
|
|
|
Jul 28 2005, 04:45 AM
Post
#2
|
|
|
Group: Members Posts: 577 Joined: 17-March 04 Member No.: 2,365 |
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 :-(
|
|
|
|
Jul 28 2005, 07:28 AM
Post
#3
|
|
|
Group: Members Posts: 1,497 Joined: 12-November 03 From: Germany Member No.: 907 |
Sounds like you are using an old toolchain on a recent distribution. That's tough. Try installing libstdc++.so.5 to make moc working.
|
|
|
|
Aug 3 2005, 10:29 AM
Post
#4
|
|
|
Group: Members Posts: 5 Joined: 7-July 04 From: Maryland Member No.: 3,939 |
Thanks for the responses! Now all I need are 2-3 more hours in each day so I can play with it!
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 11:01 PM |