Android±àÒë»·¾³(1) ±àÒëNative CµÄhelloworldÄ£¿é
Android±àÒë»·¾³±¾Éí±È½Ï¸´ÔÓ£¬ÇÒ²»ÏñÆÕͨµÄ±àÒë»·¾³£ºÖ»Óж¥²ãĿ¼Ï²ÅÓÐMakefileÎļþ£¬¶øÆäËûµÄÿ¸öcomponent¶¼Ê¹ÓÃͳһ±ê×¼µÄ
Android.mk.
Android.mkÎļþ±¾ÉíÊDZȽϼòµ¥µÄ£¬²»¹ýËü²¢²»ÊÇÎÒÃÇÊìϤµÄMakefile£¬¶øÊǾ¹ýÁËAndroid×ÔÉí±àÒëϵͳµÄºÜ¶à´¦Àí£¬Òò´ËÒªÕæÕýÀíÇå
³þÆäÖеÄÁªÏµ»¹±È½Ï¸´ÔÓ£¬²»¹ýÕâÖÖ·½Ê½µÄºÃ´¦ÔÚÓÚ£¬±àдһ¸öеÄAndroid.mkÀ´¸øAndroidÔö¼ÓÒ»¸öеÄComponent»á±È½Ï¼òµ¥¡£
±àÒëJava³ÌÐò¿ÉÒÔÖ±½Ó²ÉÓÃEclipseµÄ¼¯³É»·¾³À´Íê³É£¬ÕâÀï¾Í²»Öظ´ÁË¡£ÎÒÃÇÖ÷ÒªÕë¶ÔC/C++À´ËµÃ÷£¬ÏÂÃæͨ¹ýÒ»¸öСÀý×ÓÀ´ËµÃ÷£¬ÈçºÎÔÚAndroid ÖÐÔö¼ÓÒ»¸öC³ÌÐòµÄHello World£º
1. ÔÚ$(YOUR_ANDROID)/development Ŀ¼Ï´´½¨helloĿ¼£¬ÆäÖÐ$(YOUR_ANDROID)Ö¸AndroidÔ´´úÂëËùÔÚµÄĿ¼¡£
- # mkdir $(YOUR_ANDROID)/development/hello
2. ÔÚ$(YOUR_ANDROID)/development/hello/Ŀ¼±àдhello.cÎļþ£¬hello.cµÄÄÚÈݵ±È»¾ÍÊǾµäµÄHelloWorld³ÌÐò£º
#include <stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}
3. ÔÚ$(YOUR_ANDROID)/development/hello/Ŀ¼±àдAndroid.mkÎļþ¡£ÕâÊÇAndroid
MakefileµÄ±ê×¼ÃüÃû£¬²»Òª¸ü¸Ä¡£Android.mkÎļþµÄ¸ñʽºÍÄÚÈÝ¿ÉÒԲο¼ÆäËûÒÑÓеÄAndroid.mkÎļþµÄд·¨£¬Õë¶Ô
helloworld³ÌÐòµÄAndroid.mkÎļþÄÚÈÝÈçÏ£º
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
hello.c
LOCAL_MODULE := helloworld
include $(BUILD_EXECUTABLE)
×¢ÒâÉÏÃæLOCAL_SRC_FILESÓÃÀ´Ö¸¶¨Ô´Îļþ£»£¬LOCAL_MODULEÖ¸¶¨Òª±àÒëµÄÄ£¿éµÄÃû×Ö£¬ÏÂÒ»²½Öè±àÒëʱ¾ÍÒªÓõ½£»include
$(BUILD_EXECUTABLE)±íʾҪ±àÒë³ÉÒ»¸ö¿ÉÖ´ÐÐÎļþ£¬Èç¹ûÏë±àÒë³É¶¯Ì¬¿âÔò¿ÉÓÃBUILD_SHARED_LIBRARY£¬ÕâЩ¿ÉÒÔ
ÔÚ$(YOUR_ANDROID)/build/core/config.mk²éµ½¡£
4. »Øµ½AndroidÔ´´úÂ붥²ãĿ¼½øÐбàÒ룺
# cd $(YOUR_ANDROID) && make helloworld
×¢Òâmake helloworldÖеÄÄ¿±êÃûhelloworld¾ÍÊÇÉÏÃæAndroid.mkÎļþÖÐÓÉLOCAL_MODULEÖ¸¶¨µÄÄ£¿éÃû¡£±àÒë½á¹ûÈçÏ£º
target thumb C: helloworld <= development/hello/hello.c
target Executable: helloworld (out/target/product/generic/obj/EXECUTABLES/helloworld_intermediates/LINKED/helloworld)
target Non-prelinked: helloworld (out/target/product/g
Ïà¹ØÎĵµ£º
ÎÒÕâÁ½ÌìÔÚCSDNÂÛ̳¿ªÁËÒ»¸öÉ¢·ÖÌù£¬ÏëÐû´«Ò»ÏÂÎÒµÄÊé¡£´ó¶àÊýÅóÓÑ»¹ÊǺÜÓѺõģ¬¶ÔÎÒµÄÖ§³ÖºÍ¹ÄÀøºÜ¶à£¬ÎÒÒ²ºÜ¸Ð¼¤¡£
ÍøÖ·ÔÚÕâÀhttp://topic.csdn.net/u/20091216/22/5a6594be-21e6-459e-ab41-57755273f465.html
µ±È»£¬Ò²ÓÐÅóÓÑÈÏΪФijÈË´µÅ££¬Ëµ0bug²»¿ÉÄÜ£¬²¢ÇÒÒþÒþÓÐPKµÄÒâ˼£¬ÎÒÄØû°ì·¨£¬Ð´Á˸ö˵Ã÷¡£
ÕâÀïÏëÁ ......
£¨1£©zImage×Ô½âѹ
±¾ÎÄÒÔÁ÷ÐеÄSamsung¹«Ë¾µÄS3C2410£¬mini2440ƽ̨ºÍlinux-2.6.29ΪÀý£¬½éÉÜÈçºÎÔÚZIXǶÈëʽ¿ª·¢»·¾³ÏÂ̽Ë÷linuxÄÚºËÆô¶¯¹ý³Ì¡£
LinuxÄÚºËÆô¶¯Ò»°ãÓÉÍⲿµÄbootloaderÒýµ¼£¬Ò²¿ÉÒÔÔÚÄÚºËÍ·²¿Ç¶ÈëÒ»¸öloader£¬Êµ¼ÊµÄÓ¦ÓÃÖÐÕâÁ½ÖÖ·½Ê½¶¼»á¾³£Óöµ½¡£ËùÒÔÒªÁ˽âÄÚºËÆô¶¯×ʼµÄ¹ý³Ì£¬±ØÐë¶ÔbootloaderÈçºÎ ......
Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
&n ......
cÎļþ²Ù×÷º¯Êý
clearerr£¨Çå³ýÎļþÁ÷µÄ´íÎóÆì±ê£©
Ïà¹Øº¯Êý feof
±íÍ·Îļþ #include
¶¨Ò庯Êý void clearerr(FILE * stream);
º¯Êý˵Ã÷ clearerr£¨£©Çå³ý²ÎÊýstreamÖ¸¶¨µÄÎļþÁ÷ËùʹÓõĴíÎóÆì±ê¡£
·µ»ØÖµ
fclose£¨¹Ø±ÕÎļþ£© ......
ÎҼƻ®µÄѧϰÀú³Ì£º
1. cºÍc++µÄ»ù´¡ÖªÊ¶£¬Õâ¸öºÍ²Ù×÷ϵͳÎ޹أ¬ÔÚwindowsÉÏÒ²¿ÉÒÔѧ¡£cÓïÑÔÓï·¨Ïà¶Ô¼òµ¥Ò»µã£¬c++²»ÐèÒª°ÑËùÓеÄ֪ʶµã¶¼Ñ§»á£¬ÒªÖªµÀ»ù±¾µÄ·â×°£¬¼Ì³Ð£¬¶à̬֮ÀàµÄ£¬»¹ÓÐSTL¡£¸üÉîÈëµÄѧϰӦ¸ÃÊÇÔÚÒÔºóµÄ¹¤×÷ÖÐÓöµ½ÎÊÌâÁËÔÙÈ¥²é×ÊÁÏ¡£
2. ¿´Ê顶APUE¡·£¬×öÊéÉϵÄÏ°Ì⣬ÕÆÎÕÎļþ£¬ÏµÍ³µ÷Óã¬Ï̡߳¢½ø³Ì¡¢ ......