I followed the examples for setting up a QT cross build environment and an 
Arm-Linux-gnueabihf tool chain
http://exploringbeaglebone.com/chapter11/
http://exploringbeaglebone.com/chapter7 

I've also followed his directions on building QT for the BBB (arm-gueabihf)

The simple command line built program,

#include <QApplication>
#include <QLabel>
 
int main(int argc, char *argv[]){
   QApplication app(argc, argv);
   QLabel label("Hello BeagleBone!");
   label.resize(200, 100);
   label.show();
   return app.exec();
}



worked fine, I was able to sftp it to the target and run if locally in an 
LXDE xterm, or via ssh -XC.

However when I tried to build a simple widget application using QT creator 
I ran into various issues.

#include "widget.h" #include <QApplication> int main(int argc, char 
*argv[]) { QApplication a(argc, argv); Widget w; w.show(); return a.exec(); 
} 

#include "widget.h" Widget::Widget(QWidget *parent) : QWidget(parent) { } 
Widget::~Widget() { } 

#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = 0);
    ~Widget();
};

#endif // WIDGET_H


The above project (main.ccp, widget.cpp, and widget.h) compiles and runs 
when built for the desktop, but when I sftp it
to the BBB and run it either way, I get a missing symbol error

./Test3: symbol lookup error: ./Test3: undefined symbol: 
_ZN7QWidget8qwsEventEP8QWSEvent 

My BB is running the Linux distro it came with
uname -a
Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l 
GNU/Linux

and I've installed QT on it via apt-get (rev 4.8.2).  The version of QT I 
built on my host build system is the same.

As an experiment I tried replacing the installed Qt libraries with the 
crossbuilt ones.  I then get a different error when trying to run the 
simple program on the BBB (either via SSH -XC or locally in the LXDE X term)

ebian@beaglebone:~/lib$ ./Test3    
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
No Qt for Embedded Linux server appears to be running.
If you want to run this program as a server,
add the "-qws" command-line option.

That "QWS" seems to mean something, it's buried in that missing symbol 
message.  The applications (both the command line version and the QT 
creator one) were both linked against the arm-gueabihf libraries built on 
the cross dev machine, but only the QT-creator (using the widget class) has 
the issues.  Simple examples built to run on the PC (Debian Jessie) run as 
expected.

Any ideas what I've got miss-configured here?






-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to