Moto Linux应用开发(四):A1200官方SDK

今天终于拿到moto官方SDK,是for A1200的,包括toolchian和EZX库及头文件,该SDK也适用于moto E6. 按照安装指导文档安装好SDK并执行脚本设置好环境变量后,首先是build一个最简单的sample程序hello,以验证SDK是否安装正确。运行qmake却出现如下错误:

 

~/workspace/devtools/moto-sdk/sample/gui/hello$ qmake hello.pro 

qmake: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory

 

使用ldd命令查看sdk所带的qmake所依赖的动态库:

~/workspace/devtools/moto-sdk/qt-2.3.6/bin$ ldd qmake

linux-gate.so.1 =>  (0xb7f0a000)

libstdc++-libc6.2-2.so.3 => not found

libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7ed1000)

libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d6d000)

/lib/ld-linux.so.2 (0xb7f0b000)

可以看到qmake依赖的动态库libstdc++-libc6.2-2.so.3,上网搜索了一下,了解到这个库是老版本的gcc库文件,ubuntu下的解决方法是上http://packages.ubuntu.com上下载并安装libstdc++2.10-glibc2.2_2.95.4-24_i386.deb包,此时qmake可以生成Makefile,但是make时又出现如下错误:

 

~/workspace/devtools/moto-sdk/sample/gui/hello$ make

arm-linux-g++ -DQT_QWS_IPAQ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I. -I/home/chenzhengyong/workspace/devtools/moto-sdk/ezx/include -I/home/chenzhengyong/workspace/devtools/moto-sdk/ezx/include/gui -I/home/chenzhengyong/workspace/devtools/moto-sdk/qt-2.3.6/include -I/home/chenzhengyong/workspace/devtools/moto-sdk/qt-2.3.6/mkspecs/qws/linux-ipaq-g++ -o MyWidget.o MyWidget.cpp

arm-linux-g++ -DQT_QWS_IPAQ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I. -I/home/chenzhengyong/workspace/devtools/moto-sdk/ezx/include -I/home/chenzhengyong/workspace/devtools/moto-sdk/ezx/include/gui -I/home/chenzhengyong/workspace/devtools/moto-sdk/qt-2.3.6/include -I/home/chenzhengyong/workspace/devtools/moto-sdk/qt-2.3.6/mkspecs/qws/linux-ipaq-g++ -o main.o main.cpp

/home/chenzhengyong/workspace/devtools/moto-sdk/qt-2.3.6/bin/moc MyWidget.h -o moc_MyWidget.cpp

/home/chenzhengyong/workspace/devtools/moto-sdk/qt-2.3.6/bin/moc: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory

make: *** [moc_MyWidget.cpp] Error 127

解决的方法是建立一个链接:

~/workspace/devtools/moto-sdk/sample/gui/hello$ sudo ln -s libstdc++-3-libc6.2-2-2.10.0.so /usr/lib/libstdc++-libc6.1-1.so.2

再make即可生成应用程序,可以下载到手机上运行。

 

 

 

你可能感兴趣的:(thread,linux,object,File,ubuntu,makefile)