vs2013编译flac1.3.3源码

vs2013编译flac1.3.3
首先在0上得到falc-1.3.3.tar.xz的压缩包,进行解码得到flac-1.3.3文件夹。
利用VS2013打开FLAC.sln,会提示升级VC++编译器和库,点击确定。等待一段时间。


Building with MSVC
There are .vcproj projects and a master FLAC.sln solution to build all the libraries and executables with MSVC 2005 or newer.
Prerequisite: you must have the Ogg libraries installed as described later.
Prerequisite: you must have nasm installed, and nasm.exe must be in your PATH, or the path to nasm.exe must be added to the list of directories for executable files in the MSVC global options.
先决条件:您必须按照稍后所述安装Ogg库。
前提条件:您必须安装nasm,并且nasm.exe必须位于PATH中,或者必须将nasm.exe的路径添加到MSVC全局选项中可执行文件的目录列表中。
前提条件解决办法参见wangwang_2015的博客,详细网址:1

先决条件的解决:接下来点击生成解决方案会出现一系列的错误,首先会提示缺少libogg_static.lib库,通过2下载
libogg-1.3.4.tar.gz,解压缩后,打开libogg-1.3.4\libogg-1.3.4\win32\vs2015\libogg.sln,应该也会让你升级,点击确定。

编译会提示错误 1 error MSB8020: The build tools for v140 (Platform Toolset = ‘v140’) cannot be found. To build using the v140 build tools, please install v140 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting “Upgrade Solution…”.
这是一个小错误,是vs中v140的平台工具集,点击项目->属性->配置属性->常规->平台工具集->Visual Studio 2013(v120)在这里插入图片描述
编译成功后会生成:
libogg-1.3.4\libogg1.3.4\win32\VS2015\Win32\Debug\libogg.lib
复制libogg.lib到flac-1.3.3\flac1.3.3\objs\release\lib,将libogg.lib修改为libogg_static.lib。
复制libogg-1.3.4\libogg1.3.4\include\ogg到flac-1.3.3\flac1.3.3\include。
再次将FLAC生成解决方案,发现有部分工程出现找不到libogg_static.lib库。
打开example_c_decode_file项目的属性->配置属性->链接器->输入->附加依赖项$(SolutionDir)objs$(Configuration)\lib\libogg_static.lib;个人猜测是Configuration指的是debug或release,编译器路径出错,修改为$(SolutionDir)objs\release\lib\libogg_static.lib,错误果然消失。修改全部工程,再次编译即可通过!
如果提示没找到libFLAC_static.lib库,单独打开libFLAC_static工程进行编译,在…\objs\debug\lib\查看是否生成。

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值