play-co / devkit

HTML 5 game platform for browser and mobile
http://docs.gameclosure.com
627 stars 126 forks source link

ndk-build errors #187

Closed AlexanderPatuk closed 9 years ago

AlexanderPatuk commented 10 years ago

build errors Fatal errors apeared when ndk-build runs : [ndk-build] jni/js/js_context.cpp:637:33: error: narrowing conversion of 'g' from 'double' to 'float' inside { } is ill-formed in C++11 [-Werror=narrowing] [ndk-build] jni/js/js_context.cpp:637:33: error: narrowing conversion of 'b' from 'double' to 'float' inside { } is ill-formed in C++11 [-Werror=narrowing] [ndk-build] jni/js/js_context.cpp:637:33: error: narrowing conversion of 'a' from 'double' to 'float' inside { } is ill-formed in C++11 [-Werror=narrowing] [ndk-build] jni/js/js_context.cpp: In function 'v8::Handlev8::Value defFill TextBitmapDeprecated(const v8::Arguments&)': [ndk-build] jni/js/js_context.cpp:735:49: error: narrowing conversion of 'x1' from 'int' to 'float' inside { } is ill-formed in C++11 [-Werror=narrowing] [ndk-build] rect_2d src_rect = {x1, y1, w, h}; [ndk-build] ^ [ndk-build] jni/js/js_context.cpp:735:49: error: narrowing conversion of 'y1' from 'int' to 'float' inside { } is ill-formed in C++11 [-Werror=narrowing] [ndk-build] jni/js/js_context.cpp:735:49: error: narrowing conversion of 'w' from 'int' to 'float' inside { } is ill-formed in C++11 [-Werror=narrowing] [ndk-build] jni/js/js_context.cpp:735:49: error: narrowing conversion of 'h' from 'int' to 'float' inside { } is ill-formed in C++11 [-Werror=narrowing] [ndk-build] jni/js/js_context.cpp:736:64: error: narrowing conversion of 'x' from 'double' to 'float' inside { } is ill-formed in C++11 [-Werror=narrowing] [ndk-build] rect_2d dest_rect = {x, y, w * scale, h * scale}

Used the latest version from Git

collingreen commented 9 years ago

You'll need an older version of the ndk or to upgrade to devkit2

jwilm commented 9 years ago

This is fixed in the newer version with static_cast<float>