Taglib编译
2016-01-28 16:14
274 查看
交叉编译的脚本:
# this is requiredSET(CMAKE_SYSTEM_NAME Linux)
# specify the cross compiler
SET(CMAKE_C_COMPILER /home/hs/mentor/bin/arm-none-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /home/hs/mentor/bin/arm-none-linux-gnueabi-g++)
# set build flag
SET(GNU_FLAGS "-march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 -fPIC -Wall")
SET(CMAKE_CXX_FLAGS "${GNU_FLAGS}")
SET(CMAKE_C_FLAGS "${GNU_FLAGS}")
#
IF( NOT CMAKE_BUILD_TYPE )
SET( CMAKE_BUILD_TYPE Release ... FORCE )
ENDIF()
#SET(CMAKE_INSTALL_PREFIX /home/test/testTaglib/taglib-1.10/cross_build)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /home/hs/mentor)
# search for programs in the build host directories (not necessary)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# configure Boost and Qt
#SET(QT_QMAKE_EXECUTABLE /opt/qt-embedded/qmake)
#SET(BOOST_ROOT /opt/boost_arm)
-----------------------------------
编译步骤:
mkdir cross_build
cmake -DCMAKE_INSTALL_PREFIX=/home/hs/taglib/cross_build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./toolChain.cmake
make
make install
---------------------------------------
解决运行时链接不到so文件的问题:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/app/xx/lib:
---------------------------------------
参考链接:
http://www.linuxfromscratch.org/blfs/view/svn/multimedia/taglib.html
https://taglib.github.io/ http://www.xuebuyuan.com/2005238.html http://www.tuicool.com/articles/yAFnQ3
相关文章推荐
- 基于定时器的动画和性能调优
- netcat简易版 加 tcp代理!
- php中大括号的用法和意义{}
- Oracle日期、字符串格式化函数,位数不足前面加0,一位数字显示两位,格式化数字为定长
- webform网站相关数据控件和其他
- AD用户属性项目添加
- myeclipse 配置weblogic
- 多路归并
- iOS App检查更新
- Android组件(一)-Calendar、DataPickerDialog、PreferenceActivity、CoordinatorLayout
- SPOJ SUBST1 New Distinct Substrings
- 关于xcode的导入的文件出现问号的问题
- 云计算也分“层” 一句话读懂IaaS、PaaS、SaaS
- 从 Git Gui 管理的Repository(库) 提交更改到 Bonobo服务器管理的Repository(库)
- KEBEROS协议 概念
- 《oracle每天一练》Oracle冷备份与数据恢复
- AS3 Embed用法笔记
- mvc通过ActionFilterAttribute做登录检查
- Linux中的常用符号解释
- Windows定时关机