我用安装文件时提供的hello_cn生成的arm可执行文件,用发图片传到板子上却总是出现Segmentation fault,是我哪里做错了吗
下面是我在终端运行的程序
[root@Lin hello_cn]# make clean
rm -f moc_hello_cn.cpp
rm -f hello_cn.o main.o moc_hello_cn.o
rm -f *~ core *.core
[root@Lin hello_cn]# ls
arm_project hello_cn.cpp hello_cn.pro.user Makefile 说明
hello_cn hello_cn.h main.cpp x86_project
[root@Lin hello_cn]# cd ..
[root@Lin pro]# cd ..
[root@Lin qt-4.5]# source setARM_env
[root@Lin qt-4.5]# cd pro/hello_cn/
[root@Lin hello_cn]# ./arm_project
[root@Lin hello_cn]# make
arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../__install/arm/mkspecs/default -I. -I../../__install/arm/include/QtCore -I../../__install/arm/include/QtNetwork -I../../__install/arm/include/QtGui -I../../__install/arm/include -I. -I. -I. -o hello_cn.o hello_cn.cpp
arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../__install/arm/mkspecs/default -I. -I../../__install/arm/include/QtCore -I../../__install/arm/include/QtNetwork -I../../__install/arm/include/QtGui -I../../__install/arm/include -I. -I. -I. -o main.o main.cpp
/opt/EmbedSky/qt-4.5/__install/arm//bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../__install/arm/mkspecs/default -I. -I../../__install/arm/include/QtCore -I../../__install/arm/include/QtNetwork -I../../__install/arm/include/QtGui -I../../__install/arm/include -I. -I. -I. hello_cn.h -o moc_hello_cn.cpp
arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../__install/arm/mkspecs/default -I. -I../../__install/arm/include/QtCore -I../../__install/arm/include/QtNetwork -I../../__install/arm/include/QtGui -I../../__install/arm/include -I. -I. -I. -o moc_hello_cn.o moc_hello_cn.cpp
arm-linux-g++ -Wl,-O1 -Wl,-rpath,/opt/EmbedSky/qt-4.5/__install/arm/lib -o hello_cn hello_cn.o main.o moc_hello_cn.o -L/opt/EmbedSky/qt-4.5/__install/arm//lib -lQtGui -L/tslib-1.4/lib -L/opt/EmbedSky/qt-4.5/__install/arm//lib -lts -lQtNetwork -lQtCore -lm -lrt -ldl -lpthread
[root@Lin hello_cn]# file hello_cn
hello_cn: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
[root@Lin hello_cn]# cd /mnt/hgfs/temp/
[root@Lin temp]# ls
first first.desktop first.png first.rar hello_cn Lin Linux mainwindow
[root@Lin temp]# file hello_cn
hello_cn: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
|