0

私はC言語で小さなHello Worldプログラムを書きました。

#include<stdio.h>
int main()
{
printf(“ Hello world\n”);
return 1;
}

メイクファイルはこちら

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE    := cppTestProj
LOCAL_SRC_FILES := LOCAL_SRC_FILES := helloworld.c

include $(BUILD_SHARED_LIBRARY)

ndk-build.cmd を使用してコマンド プロンプトから同じコマンドを実行しようとすると、この種の長い不明なエラーが発生します。

jni/helloworld.c:59:1: error: stray '\277' in program
jni/helloworld.c:59:1: error: stray '\271' in program
jni/helloworld.c:59:1: error: stray '\362' in program
jni/helloworld.c:59:1: error: stray '\224' in program
jni/helloworld.c:59:1: error: stray '\34' in program
jni/helloworld.c:59:1: error: stray '\213' in program
jni/helloworld.c:59:1: error: stray '\7' in program
jni/helloworld.c:59:1: error: stray '\35' in program
jni/helloworld.c:59:1: error: stray '\310' in program
jni/helloworld.c:59:1: error: stray '\341' in program
jni/helloworld.c:59:1: error: stray '\24' in program
jni/helloworld.c:59:1: error: stray '\330' in program
jni/helloworld.c:59:1: error: stray '\370' in program
jni/helloworld.c:59:1: error: stray '\271' in program
jni/helloworld.c:59:1: error: stray '\220' in program
jni/helloworld.c:59:1: error: stray '\203' in program
jni/helloworld.c:59:1: error: stray '\223' in program
jni/helloworld.c:59:1: error: stray '\275' in program
jni/helloworld.c:59:1: error: stray '\23' in program
jni/helloworld.c:59:1: error: stray '\302' in program
jni/helloworld.c:59:1: error: stray '\214' in program
jni/helloworld.c:59:1: error: stray '\310' in program
jni/helloworld.c:59:1: error: stray '\1' in program
jni/helloworld.c:59:1: error: stray '\252' in program
jni/helloworld.c:59:1: error: stray '\261' in program
jni/helloworld.c:59:1: error: stray '\4' in program
jni/helloworld.c:59:1: error: stray '\326' in program
jni/helloworld.c:59:1: error: stray '\255' in program
jni/helloworld.c:59:1: error: stray '\200' in program
jni/helloworld.c:59:1: error: stray '\310' in program
jni/helloworld.c:59:1: error: stray '\242' in program
jni/helloworld.c:59:1: error: stray '\373' in program
jni/helloworld.c:59:1: error: stray '\235' in program
jni/helloworld.c:59:1: error: stray '\377' in program
jni/helloworld.c:59:1: error: stray '\24' in program
jni/helloworld.c:59:1: error: stray '\366' in program
jni/helloworld.c:59:1: error: stray '\17' in program
jni/helloworld.c:59:1: error: stray '\324' in program
jni/helloworld.c:59:105: warning: null character(s) ignored [enabled by default]

jni/helloworld.c:59:1: error: stray '\355' in program
jni/helloworld.c:59:1: error: stray '\277' in program
jni/helloworld.c:59:1: error: stray '\267' in program
jni/helloworld.c:59:1: error: stray '\363' in program
jni/helloworld.c:59:1: error: stray '\274' in program
jni/helloworld.c:59:1: error: stray '\5' in program
jni/helloworld.c:59:1: error: stray '\177' in program
jni/helloworld.c:59:1: error: stray '\335' in program
jni/helloworld.c:59:1: error: stray '\377' in program
jni/helloworld.c:60:1: error: stray '\321' in program
jni/helloworld.c:60:1: error: stray '\345' in program
jni/helloworld.c:60:1: error: stray '\344' in program
jni/helloworld.c:60:87: warning: null character(s) ignored [enabled by default]
jni/helloworld.c:60:1: error: stray '\353' in program
jni/helloworld.c:60:1: error: stray '\202' in program
jni/helloworld.c:60:1: error: stray '\216' in program
jni/helloworld.c:60:1: error: stray '\255' in program
jni/helloworld.c:60:1: error: stray '\226' in program
jni/helloworld.c:60:1: error: stray '\371' in program
jni/helloworld.c:60:1: error: stray '\272' in program
jni/helloworld.c:60:1: error: stray '\211' in program
jni/helloworld.c:60:1: error: stray '`' in program
jni/helloworld.c:60:1: error: stray '\215' in program
jni/helloworld.c:60:1: error: stray '\21' in program
jni/helloworld.c:60:1: error: stray '\254' in program
jni/helloworld.c:60:1: error: stray '\226' in program
jni/helloworld.c:60:1: error: stray '\252' in program
jni/helloworld.c:60:1: error: stray '\321' in program
jni/helloworld.c:60:1: error: stray '\36' in program
jni/helloworld.c:60:1: error: stray '\243' in program
jni/helloworld.c:60:1: error: stray '\252' in program
jni/helloworld.c:60:1: error: stray '\246' in program
jni/helloworld.c:60:1: error: stray '\256' in program
jni/helloworld.c:60:1: error: stray '\233' in program
jni/helloworld.c:60:1: error: stray '\220' in program
jni/helloworld.c:60:1: error: stray '\377' in program
jni/helloworld.c:60:1: error: stray '\22' in program
jni/helloworld.c:60:1: error: stray '@' in program
jni/helloworld.c:60:1: error: stray '\314' in program
jni/helloworld.c:60:1: error: stray '\34' in program
jni/helloworld.c:60:1: error: stray '\361' in program
jni/helloworld.c:60:1: error: stray '\200' in program
jni/helloworld.c:60:1: error: stray '\306' in program
jni/helloworld.c:60:1: error: stray '\21' in program
jni/helloworld.c:60:1: error: stray '\4' in program
jni/helloworld.c:60:1: error: stray '\34' in program
jni/helloworld.c:60:1: error: stray '\361' in program
jni/helloworld.c:60:1: error: stray '\200' in program
jni/helloworld.c:60:1: error: stray '\206' in program
jni/helloworld.c:60:1: error: stray '\213' in program
jni/helloworld.c:60:1: error: stray '\361' in program
jni/helloworld.c:60:1: error: stray '\260' in program
jni/helloworld.c:60:1: error: stray '\310' in program
jni/helloworld.c:60:1: error: stray '\332' in program
jni/helloworld.c:60:1: error: stray '\340' in program
jni/helloworld.c:60:1: error: stray '\265' in program
jni/helloworld.c:60:1: error: stray '\336' in program
jni/helloworld.c:60:1: error: stray '\10' in program
jni/helloworld.c:60:1: error: stray '\20' in program
jni/helloworld.c:60:1: error: stray '\274' in program
jni/helloworld.c:60:1: error: stray '\371' in program
jni/helloworld.c:60:1: error: stray '\337' in program
jni/helloworld.c:60:1: error: stray '\203' in program
jni/helloworld.c:60:1: error: stray '\252' in program
jni/helloworld.c:60:1: error: stray '\342' in program
jni/helloworld.c:60:1: error: stray '\215' in program
jni/helloworld.c:60:165: warning: null character(s) ignored [enabled by default]

jni/helloworld.c:60:1: error: stray '\221' in program
jni/helloworld.c:60:1: error: stray '\265' in program
jni/helloworld.c:60:1: error: stray '\301' in program
jni/helloworld.c:60:1: error: stray '\251' in program
jni/helloworld.c:60:1: error: stray '\361' in program
jni/helloworld.c:60:1: error: stray '\243' in program
jni/helloworld.c:60:1: error: stray '\262' in program
jni/helloworld.c:60:1: error: stray '\356' in program
jni/helloworld.c:60:1: error: stray '\201' in program
jni/helloworld.c:60:1: error: stray '\225' in program
jni/helloworld.c:60:1: error: stray '\356' in program
jni/helloworld.c:60:1: error: stray '\20' in program
jni/helloworld.c:60:1: error: stray '\4' in program
jni/helloworld.c:60:1: error: stray '\205' in program
jni/helloworld.c:60:1: error: stray '\34' in program
jni/helloworld.c:60:1: error: stray '\240' in program
jni/helloworld.c:60:1: error: stray '\246' in program
jni/helloworld.c:60:1: error: stray '#' in program
jni/helloworld.c:60:1: error: stray '\344' in program
jni/helloworld.c:60:1: error: stray '\350' in program
jni/helloworld.c:60:1: error: stray '\264' in program
jni/helloworld.c:60:1: error: stray '\211' in program
jni/helloworld.c:60:1: error: stray '\202' in program
jni/helloworld.c:60:1: error: stray '\5' in program
jni/helloworld.c:60:1: error: stray '\257' in program
jni/helloworld.c:60:1: error: stray '\241' in program
jni/helloworld.c:60:1: error: stray '\306' in program
jni/helloworld.c:60:1: error: stray '\362' in program
jni/helloworld.c:60:1: error: stray '\207' in program
jni/helloworld.c:60:1: error: stray '`' in program
jni/helloworld.c:60:1: error: stray '\215' in program
jni/helloworld.c:60:1: error: stray '#' in program
jni/helloworld.c:60:1: error: stray '\336' in program
jni/helloworld.c:60:1: error: stray '\10' in program
jni/helloworld.c:60:1: error: stray '\320' in program
jni/helloworld.c:60:1: error: stray '\342' in program
jni/helloworld.c:60:1: error: stray '\215' in program
jni/helloworld.c:60:216: warning: null character(s) ignored [enabled by default]

jni/helloworld.c:60:1: error: stray '\215' in program
jni/helloworld.c:60:1: error: stray '#' in program
jni/helloworld.c:60:1: error: stray '\336' in program
jni/helloworld.c:60:1: error: stray '\10' in program
jni/helloworld.c:60:1: error: stray '\320' in program
jni/helloworld.c:60:1: error: stray '\342' in program
jni/helloworld.c:60:1: error: stray '\215' in program
jni/helloworld.c:60:225: warning: null character(s) ignored [enabled by default]

jni/helloworld.c:60:1: error: stray '\215' in program
jni/helloworld.c:60:1: error: stray '#' in program
jni/helloworld.c:60:1: error: stray '\336' in program
jni/helloworld.c:60:1: error: stray '\10' in program
jni/helloworld.c:60:1: error: stray '\320' in program
jni/helloworld.c:60:1: error: stray '\361' in program
jni/helloworld.c:60:1: error: stray '\356' in program
jni/helloworld.c:60:1: error: stray '\207' in program
jni/helloworld.c:60:1: error: stray '\214' in program
jni/helloworld.c:60:236: warning: missing terminating ' character [enabled by de
fault]
jni/helloworld.c:60:1: error: missing terminating ' character
jni/helloworld.c:61:1: error: stray '\233' in program
jni/helloworld.c:61:1: error: stray '\361' in program
jni/helloworld.c:61:1: error: stray '\267' in program
jni/helloworld.c:61:1: error: stray '\213' in program
jni/helloworld.c:61:1: error: stray '\202' in program
jni/helloworld.c:61:1: error: stray '\16' in program
jni/helloworld.c:61:1: error: stray '\274' in program
jni/helloworld.c:61:1: error: stray '\21' in program
jni/helloworld.c:61:1: error: stray '\24' in program
jni/helloworld.c:61:1: error: stray '\202' in program
jni/helloworld.c:61:1: error: stray '\352' in program
jni/helloworld.c:61:1: error: stray '\16' in program
jni/helloworld.c:61:1: error: stray '\301' in program
jni/helloworld.c:61:22: warning: missing terminating " character [enabled by def
ault]
jni/helloworld.c:61:1: error: missing terminating " character
jni/helloworld.c:62:1: error: stray '\344' in program
jni/helloworld.c:62:1: error: stray '\267' in program
jni/helloworld.c:62:1: error: stray '\213' in program
jni/helloworld.c:62:1: error: stray '\202' in program
jni/helloworld.c:62:1: error: stray '\16' in program
jni/helloworld.c:62:1: error: stray '\274' in program
jni/helloworld.c:62:1: error: stray '\21' in program
jni/helloworld.c:62:1: error: stray '\24' in program
jni/helloworld.c:62:1: error: stray '\202' in program
jni/helloworld.c:62:1: error: stray '\352' in program
jni/helloworld.c:62:1: error: stray '\305' in program
jni/helloworld.c:62:1: error: stray '\33' in program
jni/helloworld.c:62:1: error: stray '\301' in program
jni/helloworld.c:62:22: warning: missing terminating " character [enabled by def
ault]
jni/helloworld.c:62:1: error: missing terminating " character
jni/helloworld.c:63:1: error: stray '\366' in program
jni/helloworld.c:63:1: error: stray '\234' in program
jni/helloworld.c:63:1: error: stray '\255' in program
jni/helloworld.c:63:1: error: stray '\212' in program
jni/helloworld.c:63:1: error: stray '\236' in program
jni/helloworld.c:63:1: error: stray '\322' in program
jni/helloworld.c:63:1: error: stray '\222' in program
jni/helloworld.c:63:1: error: stray '\4' in program
jni/helloworld.c:63:1: error: stray '\330' in program
jni/helloworld.c:63:1: error: stray '\6' in program
jni/helloworld.c:63:1: error: stray '\345' in program
jni/helloworld.c:63:1: error: stray '\251' in program
jni/helloworld.c:63:1: error: stray '\6' in program
jni/helloworld.c:63:19: error: invalid suffix "p" on integer constant
jni/helloworld.c:63:1: error: stray '\326' in program
jni/helloworld.c:63:1: error: stray '\22' in program
jni/helloworld.c:63:1: error: stray '\260' in program
jni/helloworld.c:63:1: error: stray '\230' in program
jni/helloworld.c:63:1: error: stray '\340' in program
jni/helloworld.c:63:1: error: stray '\276' in program
jni/helloworld.c:63:1: error: stray '\345' in program
jni/helloworld.c:63:1: error: stray '\271' in program
jni/helloworld.c:63:1: error: stray '\351' in program
jni/helloworld.c:63:1: error: stray '\342' in program
jni/helloworld.c:63:1: error: stray '\375' in program
jni/helloworld.c:63:1: error: stray '\247' in program
jni/helloworld.c:63:1: error: stray '\6' in program
jni/helloworld.c:63:1: error: stray '\2' in program
jni/helloworld.c:63:1: error: stray '\313' in program
jni/helloworld.c:63:1: error: stray '\31' in program
jni/helloworld.c:63:1: error: stray '\22' in program
jni/helloworld.c:63:1: error: stray '\210' in program
jni/helloworld.c:63:1: error: stray '\351' in program
jni/helloworld.c:63:1: error: stray '\201' in program
jni/helloworld.c:63:1: error: stray '\235' in program
jni/helloworld.c:63:1: error: stray '\342' in program
jni/helloworld.c:63:1: error: stray '\177' in program
jni/helloworld.c:63:1: error: stray '\4' in program
jni/helloworld.c:63:1: error: stray '\270' in program
jni/helloworld.c:63:1: error: stray '\203' in program
jni/helloworld.c:63:1: error: stray '\335' in program
jni/helloworld.c:63:1: error: stray '\363' in program
jni/helloworld.c:63:1: error: stray '\226' in program
jni/helloworld.c:63:1: error: stray '\4' in program
jni/helloworld.c:63:1: error: stray '\243' in program
jni/helloworld.c:63:1: error: stray '\304' in program
jni/helloworld.c:63:1: error: stray '\25' in program
jni/helloworld.c:63:1: error: stray '\22' in program
jni/helloworld.c:63:1: error: stray '\216' in program
jni/helloworld.c:63:1: error: stray '\337' in program
jni/helloworld.c:63:1: error: stray '\303' in program
jni/helloworld.c:63:1: error: stray '\235' in program
jni/helloworld.c:63:1: error: stray '#' in program
jni/helloworld.c:63:1: error: stray '\302' in program
jni/helloworld.c:63:1: error: stray '\331' in program
jni/helloworld.c:63:1: error: stray '\321' in program
jni/helloworld.c:63:1: error: stray '\365' in program
jni/helloworld.c:63:1: error: stray '\317' in program
jni/helloworld.c:63:1: error: stray '\360' in program
jni/helloworld.c:63:1: error: stray '\311' in program
jni/helloworld.c:63:1: error: stray '\300' in program
jni/helloworld.c:63:1: error: stray '\306' in program
jni/helloworld.c:63:1: error: stray '\272' in program
jni/helloworld.c:63:1: error: stray '\207' in program
jni/helloworld.c:63:1: error: stray '\252' in program
jni/helloworld.c:63:1: error: stray '\355' in program
jni/helloworld.c:63:1: error: stray '\320' in program
jni/helloworld.c:63:1: error: stray '\236' in program
jni/helloworld.c:63:1: error: stray '\33' in program
jni/helloworld.c:63:1: error: stray '\207' in program
jni/helloworld.c:63:1: error: stray '\214' in program
jni/helloworld.c:63:1: error: stray '\237' in program
jni/helloworld.c:63:1: error: stray '\372' in program
jni/helloworld.c:63:1: error: stray '\366' in program
jni/helloworld.c:63:1: error: stray '\345' in program
jni/helloworld.c:63:1: error: stray '\311' in program
jni/helloworld.c:63:1: error: stray '\315' in program
jni/helloworld.c:63:1: error: stray '\10' in program
jni/helloworld.c:63:1: error: stray '\331' in program
jni/helloworld.c:63:1: error: stray '\276' in program
jni/helloworld.c:63:1: error: stray '\256' in program
jni/helloworld.c:63:1: error: stray '\242' in program
jni/helloworld.c:63:1: error: stray '\5' in program
jni/helloworld.c:63:1: error: stray '\10' in program
jni/helloworld.c:63:1: error: stray '\372' in program
jni/helloworld.c:63:1: error: stray '\320' in program
jni/helloworld.c:63:1: error: stray '\321' in program
jni/helloworld.c:63:1: error: stray '\326' in program
jni/helloworld.c:63:1: error: stray '\7' in program
jni/helloworld.c:63:1: error: stray '\333' in program
jni/helloworld.c:63:1: error: stray '\37' in program
jni/helloworld.c:63:1: error: stray '\363' in program
jni/helloworld.c:63:139: warning: null character(s) preserved in literal [enable
d by default]
jni/helloworld.c:63:139: warning: missing terminating " character [enabled by de
fault]
jni/helloworld.c:63:1: error: missing terminating " character
make: *** [obj/local/armeabi/objs/cppTestProj/helloworld.o] Error 1

問題が何であるかを知ることができますか

4

2 に答える 2

3
于 2012-10-25T15:14:48.537 に答える
0

main を使用してライブラリをコンパイルしています。android.mk の最後の行を参照してください。

include $(BUILD_SHARED_LIBRARY)

バイナリの使用を構築するには:

include $(BUILD_EXECUTABLE)
于 2012-10-26T08:46:30.073 に答える