(Based on version 2.2.2)
This step is not as easy as vs2013. I have referenced many articles. Still cannot solve the problem. It's only time to explore. I will post it here, hoping that we can avoid detours.
This is also the example of mylib mentioned in the previous article. [Cocos2dx note 003] Vs2013 adds a static library project
First, go to external \ mylib and use a text editor to open Android. mk.
And modify the part of the circle in the graph.
The Modification result is as follows:
LOCAL_PATH: = $ (call my-dir) include $ (CLEAR_VARS) LOCAL_MODULE: = mylib_staticLOCAL_MODULE_FILENAME: = libmylibLOCAL_SRC_FILES: = \ src/mylibtest. cpp LOCAL_EXPORT_C_INCLUDES :=$ (LOCAL_PATH)/includeLOCAL_C_INCLUDES :=$ (LOCAL_PATH)/inclu:=-std = c99 include $ (BUILD_STATIC_LIBRARY) Note: $ (LOCAL_PATH) Here is Android. the directory where mk is located.
In this way, a database project is OK, and the next step is to use it in your own project. My project is an xmtank example.
In the red circle. Then, include the header file of the static library in the source file or header file of the project.
Then compile and run it in cygwin.
In this way, you can compile and use your static library in android. I haven't done anything under iOS yet, and I haven't configured this iOS project yet.