我已经在这里找到并阅读了这个问题,也在这里和这里提出了问题,不幸的是它仍然没有得到解决.(虽然我使用了该线程中的所有提示尽可能多地提供信息)
有几天我一直试图找到一种能够交叉编译Qt的方法,因为我最近有一个,现在想学习如何编写一些基本的嵌入式应用程序.
我在这里关注教程: http ://visualgdb.com/tutorials/raspberry/qt/embedded/
apt-get install libudev-dev libinput-dev libts-dev libxcb*第一次运行它,configure说是缺少libs)2015-11-21-raspbian-jessie与raspberry-gcc-4.9.2-r2.exeqt-everywhere-opensource-src-5.5.0.tar.xz)../qt-everywhere-opensource-src-5.5.0/configure -platform win32-g++ -xplatform linux-arm-gnueabi-g++ -release -opengl es2 -device linux-rasp-pi2-g++ -sysroot C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -device-option CROSS_COMPILE=C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf- -qt-xcb几个小时后,一切都建好了,大概没有错误.(我的输出与教程中的屏幕截图相同)
但是,尝试运行任何构建的示例,只会产生一行: Illegal instruction
按照我在开头提到的主题,这是file输出:
root@raspberrypi:/usr/local/qt5/examples/opengl/cube# file cube
cube: ELF 32-bit LSB executable, ARM, EABI5 version 1 …Run Code Online (Sandbox Code Playgroud)我在这里写了一个非常简单的Qt程序:
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QTableView table(&frame);
table.resize(100, 100);
table.show();
return app.exec();
}
Run Code Online (Sandbox Code Playgroud)
当我尝试设置一个点击表的断点时,我从gdb得到这个错误:
(gdb) symbol-file /usr/lib/libQtGui.so.4.4.3.debug
Load new symbol table from "/usr/lib/libQtGui.so.4.4.3.debug"? (y or n) y
Reading symbols from /usr/lib/libQtGui.so.4.4.3.debug...done.
(gdb) br 'QAbstractItemView::clicked(QModelIndex const&)'
Breakpoint 1 at 0x5fc660: file .moc/release-shared/moc_qabstractitemview.cpp, line 313.
(gdb) run
Starting program: ./qt-test
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x5fc660: Input/output error.
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么不能插入断点?