晚上用cmake生成了一份lua-cjson的工程文件,msvc6的 编译时报错 后来再stackoverflow找到答案:unable to use inline in declaration get error C2054 解决方法: Use __inline with MSVC. inline is a c99 keyword and c99 is not yet (fully) supported with MSVC. "The inline keyword is available o
内联函数,即在编译的时候将函数体替换函数调用,从而不需要将parameter,return address进行push/pop stack的操作,从而加速app的运行,然而,会增加二进制文件的大小. 比如,再源码中: [html] view plaincopyprint? inline int foo(int a, int b) { return a + b; } void bar(int a, int b) { NSLog(@"%d", foo(a, b)); } 编译过后成为: