• 3984阅读
  • 0回复

qt运行报错segmatation fault [复制链接]

上一主题 下一主题
 

只看楼主 倒序阅读 楼主  发表于: 2016-11-24

配置文件qmake.conf
include(../../common/linux.conf)
  6 include(../../common/gcc-base-unix.conf)
  7 include(../../common/g++-unix.conf)
  8 include(../../common/qws.conf)
  9
10 # modifications to g++.conf
11 QMAKE_CC                = arm-linux-gcc
12 QMAKE_CXX               = arm-linux-g++
13 QMAKE_LINK              = arm-linux-g++
14 QMAKE_LINK_SHLIB        = arm-linux-g++
15
16 # modifications to linux.conf
17 QMAKE_AR                = arm-linux-ar cqs
18 QMAKE_OBJCOPY           = arm-linux-objcopy
19 QMAKE_STRIP             = arm-linux-strip
20
21 # Support static build.                                                                                                          
    
22 QMAKE_LFLAGS            = -static
23
24 # Reduce code size.
25 QMAKE_CFLAGS_RELEASE    = -Os
26 QMAKE_CXXFLAGS_RELEASE  = -Os
27
28 # Include/library path for tslib
29 QMAKE_INCDIR            = /usr/local/arm_linux_4.8/usr/include
30 QMAKE_LIBDIR            = /usr/local/arm_linux_4.8/usr/lib


配置configure:

./configure \
-prefix /home/zhang/test/qt4.8.5 \
-release \
-opensource \
-static \
-qconfig dist \
-no-exceptions \
-no-accessibility \
-no-stl \
-no-qt3support \
-no-xmlpatterns \
-no-multimedia \
-no-audio-backend \
-no-phonon \
-no-phonon-backend \
-no-svg \
-no-webkit \
-no-javascript-jit \
-no-script \
-no-scripttools \
-no-declarative \
-no-declarative-debug \
-qt-zlib \
-qt-freetype \
-no-gif \
-qt-libpng \
-no-libmng \
-no-libtiff \
-qt-libjpeg \
-no-openssl \
-nomake tools \
-nomake demos \
-nomake examples \
-nomake docs \
-nomake translations \
-no-nis \
-no-cups \
-no-iconv \
-no-pch \
-no-dbus \
-embedded arm \
-platform qws/linux-x86-g++ \
-xplatform qws/linux-nuc970-g++ \
-no-gtkstyle \
-no-nas-sound \
-no-opengl \
-no-openvg \
-no-sm \
-no-xshape \
-no-xvideo \
-no-xsync \
-no-xinerama \
-no-xcursor \
-no-xfixes \
-no-xrandr \
-no-xrender \
-no-mitshm \
-no-fontconfig \
-no-xinput \
-no-xkb \
-no-glib \
-qt-gfx-linuxfb \
-qt-mouse-tslib \
-qt-kbd-linuxinput

编译后的lib库放入到板子的usr/qt/下
触摸屏测试校准都能正常使用,运行qt程序的时候会报:
/mnt # ./calculator -qws
Segmentation fault

这个calculator是qmake生成的makefile编译产生的,是example中的例子


/etc/profile的设置为:
QTDIR=/usr/qt/lib

export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE="/etc/pointercal"
export TSLIB_CONSOLEDEVICE="none"


export  LD_LIBRARY_PATH=/lib:$QTDIR:$LD_LIBRARY_PATH
export  QT_QWS_FONTDIR=$QTDIR/fonts/
export  QWS_SIZE=800x480
export  QWS_DISPLAY="LinuxFb:mmWidth80:mmHeight160:0"
export  QT_PLUGIN_PATH=$QTDIR/plugins/
export  POINTERCAL_FILE=/etc/pointercal
#export  QWS_KEYBOARD="TTY:/dev/tty5"
export  QWS_MOUSE_PROTO=Tslib:/dev/input/event0
export  PATH=/bin:$PATH

ts.conf的配置为:
#Uncomment if you wish to use the linux input layer event interface
module_raw input

# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
# module_raw collie

# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
# module_raw corgi

# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
# module_raw ucb1x00

# Uncomment if you're using an HP iPaq h3600 or similar
# module_raw h3600

# Uncomment if you're using a Hitachi Webpad
# module_raw mk712

# Uncomment if you're using an IBM Arctic II
# module_raw arctic2

module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear

全部都顶格




现在查询过网上的方法:
export  QWS_MOUSE_PROTO=Tslib:/dev/input/event0
#export  QWS_MOUSE_PROTO="Intellimouse:/dev/input/mouse0"
注释到上面一句,用下面这句,触摸屏可用,不报错,但是指针出现漂移的现象,应该没校准,然后查询发现
因为触摸屏用到了event0和mouse0两个接口,但是我们实际要用的是event0的接口,所以不能去掉他。


现在的问题就是去掉event0,换上mouse0能用,但是指针漂移,不能校准
用上event0的时候,运行qt程序会报egmentation faul
快速回复
限100 字节
 
上一个 下一个