Note:这篇文章是基于Android Studio 3.01版本的,NDK是R16. step1:创建一个包含C++的项目 其他默认就可以了. C++ Standard 指定编译库的环境,其中Toolchain Default使用的是默认的CMake环境:C++ 11也就是C++环境.两种环境都可以编库,至于区别,后续会跟进,当前博文使用的是CMake环境. Exceptions Support 如果选中复选框,则表示当前项目支持C++异常处理,如果支持,在项目Module级别的build.g
Visual Studio命令行创建库文件lib OS:win7 旗舰版SP1 64位 编译器: VS 2013 express 的cl 建一个文件Static_Lib.h,源代码如下 #ifndef _STATIC_LIB_H_ #define _STATIC_LIB_H_ int Add ( int , int ); #endif 同一个文件夹下建一个文件Static_Lib.c,源代码如下 #include "Static_Lib.h" int Add (int a, int b
打开模板功能 不知道什么原因,cocos 3.16关闭了模板功能,因此使用cocos -h命令时,无法显示gen-templates参数. 打开的方式也挺简单,打开tools/cocos2d-console/bin/cocos2d.ini文件,修改将28行"#plugin_generate.TemplateGenerator"前的注释去掉. 生成预编译库 cocos gen-libs 生成模板 cocos new -t binary 生成工程 cocos new test -p com
CMake生成Unicode版本VC工程 Just add this line in your top CMakeLists.txt file: add_definitions(-DUNICODE -D_UNICODE) if(MSVC) add_definitions(-DUNICODE -D_UNICODE) endif() 基本配置 配置生成库输出目录 ExportDir=F:\Develop\bin\x64 Add Entry: