Demand:
COCOS2DX Android Game development requires that you often call C + + functions from Java code, which is to use the Javah class file generated by the Java file, generates a header file.
Build steps:
1, into the Android Project Bin directory, the bin directory will have a classes directory, this directory is our project Java files generated by the class file.
2. Enter the classes directory
3. Execute Javah command:
Xxx\bin\classes>javah-classpath. com.dd.mm.zz.classname (does not contain a. class suffix)
4, will be in the current directory to generate the header files we need.
Note: You do not need to specify all the jar package paths with-classpath. Just need to use only . Can.
If you have an error similar to the following: it is generally because the path is not correct.
Error: Unable to access com.dd. Mm.zz.classname
Com.dd not found . class files for mm.zz.classname
Javadoc: Error-Class com.dd not found . mm.zz.classname.
Error: No classes were specified on the command line. Please try using-help.
Javah command usage record