'tojs' in win32, Errors in parsing

Follow the README file to deploy, but errors in parsing.

  1. <severity = Fatal,
    location = <SourceLocation file ‘E:/cocos2d-2.1rc0-x-2.1.2/tools/tojs/…/…/cocos2dx/platform/android\CCPlatformDefine.h’, line 4, column 10>,
    details = “‘android/log.h’ file not found”>

And “‘float.h’ file not found”, ‘math.h’, ‘string.h’…, and so on.

Why? Help me! Thanks!

Did you modify NDK_ROOT and PYTHON_ROOT in genbindings-win32.bat ?

James Chen wrote:

Did you modify NDK_ROOT and PYTHON_ROOT in genbindings-win32.bat ?
Thanks for your reply!

Yes, I modified.
set PYTHON_ROOT=E:/tools/Python27
set NDK_ROOT=E:/tools/android-sdk-windows

I found “set CLANG_ROOT=NDK_ROOT/toolchains/llvm-3.1/prebuilt/windows” in the genbindings-win32.bat file, but the path does not exist in my android dir. Need install clang? The REAMME file did not mention it.

Hi, Please notice that, it’s NDK, not SDK.

And ndk version has to be android-ndk-r8d or higher.

Maybe you should use android-ndk-r8d since i haven’t tested r8e.

James Chen wrote:

Maybe you should use android-ndk-r8d since i haven’t tested r8e.

Thank you very much
I used ndk-r8e, seemingly it worked correctly.
Although there is an error, generating succeeded.
Errors in parsing headers:

  1. <severity = Warning,
    location = <SourceLocation file ‘E:/Work_cc/cocos2d-2.1rc0-x-2.1.2/tools/tojs/…/…/cocos2dx\tilemap_parallax_nodes/CCTMXXMLParser.h’, line 72, column 5>,
    details = “enumerator value is not representable in the underlying type ‘int’”>

Thanks again!

That’s just a warning. Just skip it. :slight_smile: