qt msvc2013不知道如何生成encoder.obj

记录X.264编译经历
终于要开始研究H.264了,老板建议入职前先搞懂X.264,于是终于又要碰搁置已久的VC编程了。
周一开始上网浏览找资料,忽然发现对编程好陌生了,心中掠过一丝阴影,能搞定吗?
Lee的博客,结果发现以前收藏的链接失效了;再上网搜搜,找到了,不过他的X.264的资源都好老了,很多链接也失效了。
周二,上Google狂搜一气,找到了一些博客论坛,发现了中华视频网,让我忽然想起这个老朋友,以前也是收藏的链接的。登陆,恩,竟然不记得用户名和密码了,重新注册。
从上面下载了2007版的X.264代码,还有从别的网站下载了一堆2006版、2005版的各类代码。
从Peter Lee的博文里找到了大牛的网站()感觉很不错,简单看了一下非技术角度的H.264的解释,还挺浅显易懂的。
Lee的《如何编译X.264》里的VC6编译方法,先下载了SP5和另一个补丁,还有nasm编译器和Direct什么插件,因为文中的链接都打不开,所以只好自己搜了好久找到。还不知道怎么用,也不知道是不是用VC6,先下下来看看吧。
还是迟迟不想动手编译程序,所以又把标准和相关文章下载了一堆。
晚上准备用我的VC6试试了,结果……VC6有问题了,难道是我的Win7操作系统有问题,当初安装VC6时就有问题,算了。
在另一台win2003 server上装了VS 2008,呵呵,旧的不去新的不来嘛。
打开编程界面,对于我这个只在两年前用过VC6的人来说,好新颖好不懂……
载入x264工程,直接点编译,不出所料,一堆错误……
周三,继续在网上瞎逛,到处搜相关资源。
还是中华视频网的H.264乐园靠谱,好资源都有。
找到了“菜鸟完整版win32 vs编译X264的过程”和“VS2008下最新X264(svn
)编译不过的解决办法(附编译通过+修改内存泄露版本)”感觉靠谱,而且还提供了2009版的x264代码,下载之。
顺便还找到了版主 的博客和帖子,准备编译通过后慢慢学习了。
刚开始,先自己在VS
2008上把2009版的x264程序又直接编译了一下,依然一堆错,还是老老实实按着“菜”和“VS2008”的来吧。
“VS2008”里给出了编译通过版,所以第一个编译问题不用考虑了;接着的链接问题,从网上搜了个lookahead.c文件,也不知道对不对,先放到encoder文件夹里了;最后一个关于osdep.h的问题没有遇到。
这些都做了还不行,看来“VS2008”是跨越了菜鸟级的解决办法了。
那只能从“菜鸟”开始,咳,一开始就应该老实承认是菜鸟从头开始嘛,现在搞得是从后往前倒持了。
“菜鸟”相当好,从第二步开始来照着做。yasm.exe链接失效,自己上网搜了一个,先用着吧,复制到VC的bin文件夹中;yasm模板(还不懂是啥意思,估计就是编译规则啥的吧)链接可用,直接右键另存为,放到x264的build/win32下;按着第5步,添加了yasm.rules,不过在属性里看不到;第六步,.lib文件加链接,“菜鸟”里没写清楚(也就是还不够菜鸟,我不熟悉VS2008和VC编程环境,又是英文程序,很容易找不着地方),结果加错位置了,后来搜了错误发现应该加在solution右键属性Linker-》input里的Additional
Dependencies里。
后来发现,其实人家“菜鸟”里已经截图说明了,很清楚,可惜当时我没登陆,所以没看到图片,损失啊。
Build……OK啦,哈哈
为了防止以后链接失效,把主要参考的两个文档,转载粘贴在下面
VS2008下最新X264(svn
)编译不过的解决办法(附编译通过+修改内存泄露版本)
本帖最后由 wzt 于
08:44 PM 编辑
// [+] 09/25/09 (mm/dd/yy)
下载地址:
&&&总有人说最新的版本编译不过,搞的群、论坛里到处都是这种求助贴。建议斑竹把这个解决办法放到醒目的位置,以减少噪音。
1、编译问题
由于MS的VS编译器对C99标准支持不好,不支持函数当中混合定义、声明变量。
解决办法:在函数开头统一定义变量
void funA() {&
&& &void funA()
& &int i,j;&
& &i = 0;&
&========&&
&& &i = 0;
& &int x = 0;&
2、链接问题
libx264.lib(encoder.obj) : error LNK2019: 无法解析的外部符号
_x264_lookahead_init,该符号在函数 _x264_encoder_open_75 中被引用
1&libx264.lib(encoder.obj) : error LNK2019:
无法解析的外部符号 _x264_lookahead_is_empty,该符号在函数 _x264_encoder_encode
1&libx264.lib(encoder.obj) : error LNK2019:
无法解析的外部符号 _x264_lookahead_get_frames,该符号在函数 _x264_encoder_encode
1&libx264.lib(encoder.obj) : error LNK2019:
无法解析的外部符号 _x264_lookahead_put_frame,该符号在函数 _x264_encoder_encode
1&libx264.lib(encoder.obj) : error LNK2019:
无法解析的外部符号 _x264_lookahead_delete,该符号在函数 _x264_encoder_close
1&libx264.lib(analyse.obj) : error LNK2019:
无法解析的外部符号 _log2f,该符号在函数 _x264_mb_analyse_load_costs 中被引用
由于最近x264_param中新添了lookahead,而对应Win32工程是没有及时更新。
把encoder/lookahead.c添加到工程里(和encode.c放在一起)即可。
error LNK2019 unresolved external symbol _log2f
另外,如果最后出现error LNK2019 unresolved external symbol
_log2f,在osdep.h里定义一下log2f(不知道性能如何) :
#ifdef _MSC_VER
#define inline __inline
#define strcasecmp stricmp
#define strncasecmp strnicmp
#define snprintf _snprintf
#define fseek _fseeki64
#define ftell _ftelli64
#define isfinite _finite
#define strtok_r strtok_s
#define _CRT_SECURE_NO_DEPRECATE
#define X264_VERSION "" // no
configure script for msvc
#define log2f(x)
(logf(x)*1.9634f)
#define log2f(x)&
&&&((float)log((double)(x)))/(log((double)2))
在这篇科普后,如果还有谁再发帖子提问同样的问题,就该被拖出去打屁股了
菜鸟完整版win32 vs编译X264的过程
本帖最后由 精灵盘 于
05:42 PM 编辑
1.首先下载该处的X264:
作者已经对该版本的X264进行了一定的修改。具体修改内容可见:
2。下载yasm
选择win32.exe.如果是VS2010则下载Win32 VS2010 .zip
解压后将.exe改名成yasm.exe,主要是方便工程里面yasm的设置
将.exe放在D:\Program Files\Microsoft Visual Studio
9.0\VC\bin,查找自己的相应目录
3。接下来需要下载自定义生成的模板(自己理解的)
VS2008,VS2005下载 yasm.rules
VS2010可直接使用除了EXE外三个文件
4。模板放到你的工程目录下,如C。。。。。。\x264-snapshot-5\x264-snapshot-5\build\win32
VS2010有个一劳永逸的办法,将那三个文件放到
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations下
5。打开工程,编译X264具体的思路是先编译生成libx264d.lib,然后将该lib添加到工程lib库,最后对x264进行编译后生成x264.exe
首先编译生成libx264d.lib.右击解决方案,选择自定义生成规则,选择查找现有的,然后在弹出对话框里选择放在该目录下的yasm.rules,如果你放在别的地方就同样的方式添加。
& 然后右击解决方案,在属性里可以看到刚才新加的yasm
assemble,vs2010貌似没有显示,但不妨碍。具体的东西不用动,接着下一步。
&&&接下来打开解决方案的x86目录,可以发现ASM都集中在这里.刚才已经修改了yasm名字的,这里可以不用多改,不过也可以按照接下来的步骤进行检修改:
(43.52 KB)
(14.19 KB)
将命令行里的yasm改成你放在bin目录下的exe的名字。
如果使用yasm的话,请注意你的工程所在目录中不能有中文,否则编译的时候yasm会显示???而导致不能进行汇编。
接下来对所有的asm文件进行属性修改,完了后编译就没有什么问题了。
6。编译完了libx264后,会在工程\bin目录下生成个libx264d.lib(因人而异),可以将它提取出来放到VC的lib库里,具体路径:D:\Program
Files\Microsoft Visual Studio 9.0\VC\lib中
打开x264的工程。右击解决方案,选择属性,选择C++--&链接器
将刚才添加的lib名添加到附加依赖选项。
接下来解决方案,生成,是不是没有问题了。嘿嘿!
VS2010也同样可以解决。
下载次数:3
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。From Wikipedia, the free encyclopedia
FAAC or Freeware Advanced Audio Coder is a software project which includes the
FAAD2. It supports
AAC as well as
AAC. It supports several
object types (LC, Main, LTP for encoding and , , ER, LD for decoding), file formats (ADTS AAC, raw AAC, ), multichannel and gapless encoding/decoding and MP4 metadata tags. The encoder and decoder is compatible with standard-compliant audio applications using one or more of these object types and facilities. It also supports .
FAAC and FAAD2, being distributed in
form, can be
on various platforms and are distributed free of charge. FAAD2 is . FAAC contains some code which is published as Free Software, but as a whole it is only distributed under a proprietary license.
FAAC was originally written by Menno Bakker.
FAAC stands for Freeware Advanced Audio Coder. The FAAC encoder is an
computer program that creates AAC (MPEG-2 AAC/MPEG-4 AAC) sound files from other formats (usually,
audio files). It contains a library (libfaac) that can be used by other programs. AAC files are commonly used in computer programs and portable music players, being 's recommended format for the company's
music player.
Some of the features that FAAC has are: cross-platform support, "reasonably" fast encoding, support for more than one "object type" of the AAC format, multi-channel encoding, and support for
streams. It also supports multi-channel streams, like 5.1. The MPEG-4 object types of the AAC format supported by FAAC are the "Low Complexity" (LC), "Main", and "Long Term Prediction" (LTP). The MPEG-2 AAC profiles supported by FAAC are LC and Main. The SBR and PS object types are not supported, so the
and HE-AACv2 profiles are also not supported. The object type "Low Complexity" is the default and also happens to be used in videos meant to be playable for portable players (like Apple's iPod) and used by video-hosting sites (like ).
FAAC has been evaluated as a somewhat "lower quality" option than other aac encoders.
FAAC is one of six alternatives that / users have for creating AAC files. The others are:
The -developed "" encoder library included as part of . The FDK AAC source code is licensed under a custom-copyleft license, and has been ported to other platforms as libfdk-aac. The library is built around fixed-point math and supports only 16-bit PCM input.
The -developed "", which has a proprietary license, and is not available for the entire range of
that these operating systems are able to run. Nero no longer develops this encoder, but the package is still available, and it remains a high-quality option for AAC encoding.
native AAC encoder (considered experimental by the developers as of December 2010) (part of ), but considered "better than vo-aacenc" in at least some tests. It was written by Konstantin Shishkov, and released under version 2.1 of the .
libvo_aacenc, the Android . This encoder was replaced in Android by the FDK AAC encoder mentioned above, and is considered a poor-quality option.
The (nonfree) libaacplus which implements the .
users can utilize Apple's AAC encoder with the command-line afconvert tool.
FAAD2 is Freeware Advanced Audio (AAC) Decoder including SBR decoding. It is MPEG-2 and MPEG-4 AAC decoder and supports MPEG-4 audio object types LC, Main, LTP, LD, ER, SBR and PS, which can be combined also to HE-AAC and HE-AACv2 Profile (AAC LC+SBR+PS). It contains a library (libfaad) that can be used by other programs.
FAAD and FAAD2 were originally written by Menno Bakker from . FAAD2 is the successor to FAAD1, which was deprecated.
FAAD is Freeware Advanced Audio Decoder. It was first released in 2000 and it did not support SBR and PS audio object types. The last version of FAAD1 was . All development later focused in FAAD2. The SBR decoding support (HE-AAC) was added in the version release on 25 July 2003. FAAD2 version 2.0 was released on 6 February 2004.
FAAC contains code based on the
MPEG-4 reference code, whose license is not compatible with the
license. Only the FAAC changes to this ISO MPEG-4 reference code are licensed under the LGPL license. The ISO MPEG-4 reference software was published as ISO/IEC 14496-5 (MPEG-4 Part 5: Reference software) and it is freely available for download from ISO website. ISO/IEC gives users of the /MPEG-4 Audio standards free license to this software module or modifications thereof for use in hardware or software products claiming conformance to the MPEG-2 NBC/MPEG-4 Audio standards. Those intending to use this software module in hardware or software products are advised that this use may infringe existing patents.
FAAD2 is licensed under the
v2 (and later GPL versions). Code from FAAD2 is
of Nero AG (the "appropriate copyright message" mentioned in section 2c of the GPLv2). The source code contains a note that the use of this software may require the payment of
royalties. Commercial non-GPL licensing of this software is also possible.
FAAD (FAAD1) modifications to the ISO MPEG-4 AAC reference code were distributed under the GPL.
FAAC and FAAD2 is used in the following software products and :
video editing software.
uses FAAC encoder.
supports AAC encoding through external library libfaac, and using its experimental native encoder.
multimedia framework uses FAAC and FAAD.
uses FAAD2.
uses the FAAC (encoder) and FAAD (decoder) to provide support for AAC audio.
uses FAAD2
There is also other software that uses FAAC libraries.
. ohloh.net.
FAAC (). . SF.net.
(ZIP), Sourceforge
. Sourceforge.net.
FAAC (). . SCM Repositories.
. Canonical Ltd. 2009.
. Nero AG. 2006.
Konstantin Shishkov (2008). . FFmpeg.
– only supports 2 channels
– only supports 2 channels
(ZIP), Sourceforge
. May 2006.
FAAC (). . SF.net.
FAAC (). . SF.net.
FAAC (). . SF.net.
FAAC (2009). . SF.net.
. MultimediaWiki. .
ISO (). . ISO.
FAAC (). . SF.net.
(ZIP), ISO
. Debian packages. May 2006.
FAAC (). . SF.net.
. avidemux.org.
. CDex project.
GStreamer. . gstreamer.org.
MPlayer team. . MPlayer team.
VideoLAN Wiki (). . VideoLAN Wiki.什么是json:
JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。易于人阅读和编写。同时也易于机器解析和生成。它基于JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999的一个子集。JSON采用完全独立于语言的文本格式,但是也使用了类似于C语言家族的习惯(包括C, C++, C#, Java, JavaScript, Perl, Python等)。这些特性使JSON成为理想的数据交换语言。
JSON建构于两种结构:
&名称/值&对的集合(A collection of name/value pairs)。不同的语言中,它被理解为对象(object),纪录(record),结构(struct),字典(dictionary),哈希表(hash table),有键列表(keyed list),或者关联数组 (associative array)。 值的有序列表(An ordered list of values)。在大部分语言中,它被理解为数组(array)。 这些都是常见的数据结构。事实上大部分现代计算机语言都以某种形式支持它们。这使得一种数据格式在同样基于这些结构的编程语言之间交换成为可能。
jso官方说明参见:
Python操作json的标准api库参考:
对简单数据类型的encoding 和 decoding:
使用简单的json.dumps方法对简单数据类型进行编码,例如:
import json
obj = [[1,2,3],123,123.123,'abc',{'key1':(1,2,3),'key2':(4,5,6)}]
encodedjson = json.dumps(obj)
print repr(obj)
print encodedjson
[[1, 2, 3], 123, 123.123, 'abc', {'key2': (4, 5, 6), 'key1': (1, 2, 3)}] [[1, 2, 3], 123, 123.123, "abc", {"key2": [4, 5, 6], "key1": [1, 2, 3]}]
通过输出的结果可以看出,简单类型通过encode之后跟其原始的repr()输出结果非常相似,但是有些数据类型进行了改变,例如上例中的元组则转换为了列表。在json的编码过程中,会存在从python原始类型向json类型的转化过程,具体的转化对照如下:
json.dumps()方法返回了一个str对象encodedjson,我们接下来在对encodedjson进行decode,得到原始数据,需要使用的json.loads()函数:
decodejson = json.loads(encodedjson)
print type(decodejson)
print decodejson[4]['key1']
print decodejson
&type 'list'& [1, 2, 3]
[[1, 2, 3], 123, 123.123, u'abc', {u'key2': [4, 5, 6], u'key1': [1, 2, 3]}]
loads方法返回了原始的对象,但是仍然发生了一些数据类型的转化。比如,上例中&abc&转化为了unicode类型。从json到python的类型转化对照如下:
json.dumps方法提供了很多好用的参数可供选择,比较常用的有sort_keys(对dict对象进行排序,我们知道默认dict是无序存放的),separators,indent等参数。
排序功能使得存储的数据更加有利于观察,也使得对json输出的对象进行比较,例如:
data1 = {'b':789,'c':456,'a':123}
data2 = {'a':123,'b':789,'c':456}
d1 = json.dumps(data1,sort_keys=True)
d2 = json.dumps(data2)
d3 = json.dumps(data2,sort_keys=True)
print d1==d2
print d1==d3
{"a": 123, "b": 789, "c": 456} {"a": 123, "c": 456, "b": 789} {"a": 123, "b": 789, "c": 456} False True
上例中,本来data1和data2数据应该是一样的,但是由于dict存储的无序特性,造成两者无法比较。因此两者可以通过排序后的结果进行存储就避免了数据比较不一致的情况发生,但是排序后再进行存储,系统必定要多做一些事情,也一定会因此造成一定的性能消耗,所以适当排序是很重要的。
indent参数是缩进的意思,它可以使得数据存储的格式变得更加优雅。
data1 = {'b':789,'c':456,'a':123}
d1 = json.dumps(data1,sort_keys=True,indent=4)
{ &&& "a": 123, &&& "b": 789, &&& "c": 456 }
输出的数据被格式化之后,变得可读性更强,但是却是通过增加一些冗余的空白格来进行填充的。json主要是作为一种数据通信的格式存在的,而网络通信是很在乎数据的大小的,无用的空格会占据很多通信带宽,所以适当时候也要对数据进行压缩。separator参数可以起到这样的作用,该参数传递是一个元组,包含分割对象的字符串。
print 'DATA:', repr(data)
print 'repr(data)
:', len(repr(data))
print 'dumps(data)
:', len(json.dumps(data))
print 'dumps(data, indent=2)
:', len(json.dumps(data, indent=4))
print 'dumps(data, separators):', len(json.dumps(data, separators=(',',':')))
DATA: {'a': 123, 'c': 456, 'b': 789} repr(data)&&&&&&&&&&&& : 30 dumps(data)&&&&&&&&&&& : 30 dumps(data, indent=2)& : 46 dumps(data, separators): 25
通过移除多余的空白符,达到了压缩数据的目的,而且效果还是比较明显的。
另一个比较有用的dumps参数是skipkeys,默认为False。 dumps方法存储dict对象时,key必须是str类型,如果出现了其他类型的话,那么会产生TypeError异常,如果开启该参数,设为True的话,则会比较优雅的过度。
data = {'b':789,'c':456,(1,2):123}
print json.dumps(data,skipkeys=True)
{"c": 456, "b": 789}
处理自己的数据类型
json模块不仅可以处理普通的python内置类型,也可以处理我们自定义的数据类型,而往往处理自定义的对象是很常用的。
首先,我们定义一个类Person。
class Person(object):
def __init__(self,name,age):
self.name = name
self.age = age
def __repr__(self):
return 'Person Object name : %s , age : %d' % (self.name,self.age)
if __name__
== '__main__':
p = Person('Peter',22)
如果直接通过json.dumps方法对Person的实例进行处理的话,会报错,因为json无法支持这样的自动转化。通过上面所提到的json和python的类型转化对照表,可以发现,object类型是和dict相关联的,所以我们需要把我们自定义的类型转化为dict,然后再进行处理。这里,有两种方法可以使用。
方法一:自己写转化函数
Created on
@author: Peter
import Person
import json
p = Person.Person('Peter',22)
def object2dict(obj):
#convert object to a dict
d['__class__'] = obj.__class__.__name__
d['__module__'] = obj.__module__
d.update(obj.__dict__)
def dict2object(d):
#convert dict to object
if'__class__' in d:
class_name = d.pop('__class__')
module_name = d.pop('__module__')
module = __import__(module_name)
class_ = getattr(module,class_name)
args = dict((key.encode('ascii'), value) for key, value in d.items()) #get args
inst = class_(**args) #create new instance
return inst
d = object2dict(p)
#{'age': 22, '__module__': 'Person', '__class__': 'Person', 'name': 'Peter'}
o = dict2object(d)
print type(o),o
#&class 'Person.Person'& Person Object name : Peter , age : 22
dump = json.dumps(p,default=object2dict)
print dump
#{"age": 22, "__module__": "Person", "__class__": "Person", "name": "Peter"}
load = json.loads(dump,object_hook = dict2object)
print load
#Person Object name : Peter , age : 22
上面代码已经写的很清楚了,实质就是自定义object类型和dict类型进行转化。object2dict函数将对象模块名、类名以及__dict__存储在dict对象里,并返回。dict2object函数则是反解出模块名、类名、参数,创建新的对象并返回。在json.dumps 方法中增加default参数,该参数表示在转化过程中调用指定的函数,同样在decode过程中json.loads方法增加object_hook,指定转化函数。
方法二:继承JSONEncoder和JSONDecoder类,覆写相关方法
JSONEncoder类负责编码,主要是通过其default函数进行转化,我们可以override该方法。同理对于JSONDecoder。
Created on
@author: Peter
import Person
import json
p = Person.Person('Peter',22)
class MyEncoder(json.JSONEncoder):
def default(self,obj):
#convert object to a dict
d['__class__'] = obj.__class__.__name__
d['__module__'] = obj.__module__
d.update(obj.__dict__)
class MyDecoder(json.JSONDecoder):
def __init__(self):
json.JSONDecoder.__init__(self,object_hook=self.dict2object)
def dict2object(self,d):
#convert dict to object
if'__class__' in d:
class_name = d.pop('__class__')
module_name = d.pop('__module__')
module = __import__(module_name)
class_ = getattr(module,class_name)
args = dict((key.encode('ascii'), value) for key, value in d.items()) #get args
inst = class_(**args) #create new instance
return inst
d = MyEncoder().encode(p)
MyDecoder().decode(d)
print type(o), o
对于JSONDecoder类方法,稍微有点不同,但是改写起来也不是很麻烦。看代码应该就比较清楚了。
阅读(...) 评论()VS2008下X264(svn )编译不过的解决办法(附编译通过+修改内存泄露版本) - CSDN博客
原文地址:
&总有人说最新的版本不过,搞的群、论坛里到处都是这种贴。建议斑竹把这个解决办法放到醒目的位置,以减少噪音。
1、编译问题
由于MS的VS编译器对C99标准支持不好,不支持当中混合定义、声明变量。
解决办法:在函数开头统一定义变量
void funA() {& && && && && && && && && && &void funA() {
& &int i,j;& && && && && && && && && && && && && & int i,j,x;
& &i = 0;& && && && &========&& && && &i = 0;
& &int x = 0;& && && && && && && && && && && &&&x = 0;
}& && && && && && && && && && && && && && && &&&}
2、链接问题
libx264.lib(encoder.obj) : error LNK2019: 无法解析的外部符号 _x264_lookahead_init,该符号在函数 _x264_encoder_open_75 中被引用
1&libx264.lib(encoder.obj) : error LNK2019: 无法解析的外部符号 _x264_lookahead_is_empty,该符号在函数 _x264_encoder_encode 中被引用
1&libx264.lib(encoder.obj) : error LNK2019: 无法解析的外部符号 _x264_lookahead_get_s,该符号在函数 _x264_encoder_encode 中被引用
1&libx264.lib(encoder.obj) : error LNK2019: 无法解析的外部符号 _x264_lookahead_put_frame,该符号在函数 _x264_encoder_encode 中被引用
1&libx264.lib(encoder.obj) : error LNK2019: 无法解析的外部符号 _x264_lookahead_delete,该符号在函数 _x264_encoder_close 中被引用
1&libx264.lib(analyse.obj) : error LNK2019: 无法解析的外部符号 _log2f,该符号在函数 _x264_mb_analyse_load_costs 中被引用
由于最近x264_param中新添了lookahead,而对应Win32工程是没有及时更新。
把encoder/lookahead.c添加到工程里(和encode.c放在一起)即可。
error LNK2019 unresolved external symbol _log2f
另外,如果最后出现error LNK2019 unresolved external symbol _log2f,在osdep.h里定义一下log2f(不知道性能如何) :
#ifdef _MSC_VER
#define inline __inline
#define strcasecmp stricmp
#define strncasecmp strnicmp
#define snprintf _snprintf
#define fseek _fseeki64
#define ftell _ftelli64
#define isfinite _finite
#define strtok_r strtok_s
#define _CRT_SECURE_NO_DEPRECATE
#define _VERSION && // no configure script for msvc
#define log2f(x) (logf(x)*1.9634f)
#define log2f(x)& &&&((float)log((double)(x)))/(log((double)2))

我要回帖

更多关于 msvc2010 的文章

 

随机推荐