symbian oggplay 音乐播放器开发

本文档详细介绍了在Symbian平台上编译OggPlay的过程,包括选择合适的模块、设置编译标志、解决编译过程中遇到的问题等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

by   juwen
http://juwen.blog.51cto.com/135311/117610

这里开始进行第一编译,经常下载开源项目下来调试的朋友都知道,第一次编译是成功的关键,因为很多时候开源项目下载下来后由于机器本身的差异或者环境的差异,软件的差异,很多时候都不能正常编译(好像我觉得是绝大多数都不能一编译就成功)。
 
第一件事就是查看一下下载下来的文档HowToCompile.txt
我将比较关键的部分贴出来,其它自行查看文档。
 /////////////////////////////////////////
  Modules
 /////////////////////////////////////////
 OggPlay comes in two modules.
 An application for OggPlay Application and a dll for the ogg vorbis decoder.
 Because of the plugin nature of the decoder, the application and the decoder
 are separate entities, and each must be compiled separately.
 不一一翻译,大意就是有两部分,程序和解码器,要分开编译。
 
 /////////////////////////////////////////
  Non-MMF and MMF versions
 /////////////////////////////////////////
 
 OggPlay comes in two flavor, the Non-MMF and the MMF version. In the MMF version,
 the ogg vorbis decoder is an MMF Plugin, that can be used by any application,
 like the built-in music player, for instance.
 The MMF version requires OS support for MMF. This support is available from Symbian 7.0s.
 
 Series60 SDK 2.0 or higher is required to compile the MMF version for Series 60.
 
有两个版本,一个是使用MMF的一个是不使用MMF的,根据自己的需要选择编译,别问我MMF是什么。
 
 /////////////////////////////////////////
  Compilation Flags
 /////////////////////////////////////////
 Compilation flags should be set before starting to do any compilation.
 All compilation flags are in OggOs.h.
 There are several flags in that file, but basically, only 5 flags should be
 modified, the others are ok as they are.
 
 #define SERIES60  : When set, compilation is done for S60
 #define UIQ       : When set, compilation is done for UIQ
 #define OS70S     : When set, MMF is used.
 #define MOTOROLA      : When set, compilation for Motorola UIQ (A92X)
 #define SONYERICSSON  : When set, compilation is done for P800/P900
 
其实这里你大可以不用理会,因为oggos.h的头文件里并没有这部分的内容,另外放到其它地 方。这份文档应该是早期的版本的。由于oggplay包含很多系统的版本,里面的代码会选择性编译。这里以后再说。反正第一次编译就不用理会这么多。暂时 我们只需要选择合适的bld.inf就可以了。详细的看文件夹结构。我用s60v3mmf编译。所以直接使用/groups60v3mmf,其它类同。一 句话,找你需要的,闲事莫理。
 
 /////////////////////////////////////////
 Compilation for target device
 /////////////////////////////////////////
 
 To compile the code for target ( this expects a valid Symbian Compilation environment):
 
 For non-MMF version:
 
   Edit the file vorbis/group/bld.inf so that oggvorbis.mmp is used.
   cd /vorbis/group
   bldmake bldfiles
   abld build armi
   cd /group  
   bldmake bldfiles
   abld build armi
 For MMF version:
 
   Edit the file vorbis/group/bld.inf so that OggPluginDecoder.mmp is used.
   cd /group  
   bldmake bldfiles
   abld build armi
 
   cd /vorbis/group
   bldmake bldfiles
   abld build armi

 Note that the order is reversed in MMF case: the Application is built first, and the
 MMF plugin built afterward.
 
到编译命令了。这里可以说就是问题的关键地方,开始时由于我对symbian的开发环境不是很熟悉,我在这里走了不少弯路。我没有直接用命令行,而是使用carbide c++来进行编译,结果死活都出了几个link错误。上google找,一条相同的信息都没有。
Severity and Description Path Resource Location Creation Time Id Undefined symbol: '_ogg_sync_bufferin'[] oggplay Unknown 1228526161234 1072
 
几条类似的错误。各个版本都尝试编译,结果都是差不多的错误。然后我再尝试用命令行来编译。
 运行 abld build armi 时提示
This project does not support platform.
这个还好解决,上网找了找。原来这里分winscw、gcce、armv5,具体内容不说了。自己查查资料吧。我是安装了gcc的工具链。所以改一改代码。
abld build gcce urel
 
play/groupS60V3MMF/OGGPLAYS60V3MMF/GCCE/OGGPLAYS60V3MMF.GCCE" RESOURCEUREL
make[1]: *** No rule to make target `/Symbian/Carbide/symbianoggplay/bitmaps/s60
v3mmfsplash.bmp', needed by `/Symbian/9.2/S60_3rd_FP1/EPOC32/DATA/Z/private/F000
A661/OggSplash.mbm'.  Stop.
make: *** [RESOURCEOGGPLAYS60V3MMF] Error 2
  make -r  -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/Symbian/Carbide/symbianoggp
lay/groupS60V3MMF/GCCE.make" TARGET CFG=UREL VERBOSE=-s
make -s  -r -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/Symbian/Carbide/symbianogg
play/groupS60V3MMF/OGGSHAREDS60V3MMF/GCCE/OGGSHAREDS60V3MMF.GCCE" UREL
utf8fix.c
cc1.exe: warning: command line option "-Wno-ctor-dtor-privacy" is valid for C++/
ObjC++ but not for C
In file included from /Symbian/Carbide/symbianoggplay/SHARED/OggShared.h:23,
                 from /Symbian/Carbide/symbianoggplay/SHARED/utf8fix.c:38:
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/e32def.h:2803: error: initializer elemen
t is not constant
make[1]: *** [/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/Symbian/Carbide/symbianoggpl
ay/groupS60V3MMF/OGGSHAREDS60V3MMF/GCCE/UREL/utf8fix.o] Error 1
make: *** [TARGETOGGSHAREDS60V3MMF] Error 2
  make -r  -f "/Symbian/9.2/S60_3rd_FP1/EPOC32/BUILD/Symbian/Carbide/symbianoggp
lay/groupS60V3MMF/GCCE.make" FINAL CFG=UREL VERBOSE=-s

还是有错,追到底了。又一轮搜索,查资料。后来看了一位大哥的文章,估计开始时是函数导出有问题。
Hi jacjames, 
 
Frozen exports are a common issue when dealing with a DLL type projects unfortunately. I'm not sure exactly how to work it out through CodeWarrior but if you type 'abld freeze winscw' on a command prompt while inside the /group directory you'll get those exports frozen. After that you should be able to compile normally on CodeWarrior or on the command prompt ('abld build winscw udeb' is the command).  
 
In the off chance that it doesn't work (abld is tricky) delete the BMARM and BWINS (if there is one) directories. Don't worry, abld should recreate them. 
 
Regards, 
Francisco Pimenta 
 
我也有样学样,先
abld freeze winscw

再编译。竟然通过了。期间会有些提示找不到s60v3mmfsplash.bmp之类的错误,自己做个图片上去就行了。

WPS Office 2019 是一款功能丰富的办公软件套装,它整合了文字、表格、演示、PDF 等组件,具备体积小巧、功能丰富、兼容性强等特点,能满足日常办公的多种需求。 功能组件丰富:包含 WPS 文字、WPS 演示、WPS 表格、WPS PDF 等组件,可用于文档编辑、表格计算、幻灯片制作、PDF 处理等,支持 DOC、DOCX、XLS、XLSX、PPT 等多种格式,能与 Microsoft Office 较好地兼容。 支持云存储与协作:用户登录 WPS 账号后,可实现多终端、跨平台的数据同步,还能与他人协同办公,文档可通过微信、QQ 等社交平台一键分享。 PDF 功能强大:提供沉浸式 PDF 阅读体验和稳定的编辑服务,支持一键编辑 PDF 文档内容。借助 OCR 技术,可精准转换文档、表格、PPT、图片等格式的文件。 界面设计优化:具有全新视觉设计,默认皮肤舒适清爽,还支持桌面背景、界面字体、皮肤、格式图标等个性化设置。同时,文档标签可拖拽成独立窗口或合并,用户可自主选择文档显示方式,还能将文件放置在不同工作区,便于分类浏览与管理。 内置实用工具:内置了简单的网页浏览器,点击文档中的链接会默认用其打开,可进行网页添加到首页、另存为 PDF 等操作。此外,“应用中心” 集成了输出转换、文档助手、安全备份等多种实用功能。 模板资源丰富:稻壳商城提供了大量模板、范文、图片等素材资源,涵盖求职简历、总结计划、合同协议等常见文档类型,方便用户快速创建专业文档。 表格功能特色突出:支持通过关键词快速切换工作表,设有阅读模式和护眼模式。还可分类合并单元格,以及拆分合并单元格并填充内容。公式编辑器中可轻松完成公式嵌套,筛选时可通过 “仅筛选此项” 一步完成特定值筛选,还能根据筛选条件生成动态分析图表。另外,“特色功能” 和 “智能工具箱” 菜单中包含 PDF
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值