Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux϶¯Ì¬¿âÓ뾲̬¿â

ÌåÑéÒ»ÏÂlinuxϱàдºÍʹÓö¯Ì¬¿âÓ뾲̬¿â£¬·¶Àý£ºhelloworld³ÌÐò¡£
Ê×Ïȱàд¾²Ì¬¿â£º
hellos.h
 #ifndef _HELLO_S_H
#define _HELLO_S_H
void prints(char *str);
#endif
 
hellos.c
#include "hellos.h"
#include <stdio.h>
void prints(char *str)
{
printf("print in static way:%s",str);
}
 
¿ªÊ¼±àÒë³É¾²Ì¬¿â£º
gcc -c -o hellos.o hellos.c
ar cqs libhellos.a hellos.o
main.c
#include "hellos.h"
int main(void)
{
char *text = "hello,world\n";
prints(text);
}

ʹÓþ²Ì¬¿â±àÒ룺gcc -o hello main.c -static -L. -lhellos
È»ºóÔËÐÐhello,Êä³ö£º
print in static way: Hello World!
ɾ³ý
libhellos.aºÍ
hellos.*ºó, ³ÌÐòÈÔÈ»Õý³£ÔËÐС£
±àд¶¯Ì¬¿â
£º
hellod.h
#ifndef _HELLO_D_H
#define _HELLO_D_H
void printd(char *str);
#endif

hellod.c
#include "hellod.h"
#include <stdio.h>
void printd(char *str)
{
printf("print in dynamic way:%s",str);
}

±àÒëÉú³É¶¯Ì¬¿â£ºgcc -shared -o libhellod.so hellod.c
ÕâÑù£¬libhellod.so¾ÍÊÇÉú³ÉµÄ¶¯Ì¬¿â¡£
export LD_LIBRARY_PATH=/root/program/link/dynamic/:$LD_LIBRARY_PATH£¬Ö¸¶¨¿âÎļþ·¾¶¡£
Èç¹ûϵͳװÁËSELINUXµÄ»°£¬ÒªÖ´ÐÐchcon -t textrel_shlib_t /root/program/link/dynamic/libhellod.so¸Ä±äȨÏÞ¡£
main.c
#include "hellod.h"
int main(void)
{
char *text = "hello,world\n";
printd(text);
}

gcc -o hello main.c -L./ -lhellod
È»ºóÔËÐÐhello¿ÉÒÔ¿´µ½Êä³ö
print in dynamic way: Hello World!
Èç¹ûɾ³ý¿âÎļþ£¬»á³öÏÖ£º./hello: error while loading shared libraries: libhellod.so: cannot open shared object file: No such file or directory


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

LINUXÆÚÄ©¸´Ï° SHELL±à³Ì

Ò»¡¢SHELL¼ò½é ¢ÙʲôÊÇSHELL ´ð£ºÒ»¸ö×÷ΪÓû§ÓëLINUXϵͳ֮¼äµÄ²Ù×÷½Ó¿Ú³ÌÐò£¬ÔÊÐíÓû§Ïò²Ù×÷ϵͳÊäÈëÐèÒªÖ´ÐеÄÃüÁî¡£
      Ò»Öָ߼¶¡¢½âÊÍÐԵijÌÐòÓïÑÔ¡£     ¢ÚSHELLµÄÖÖÀà ¢ÛSHELLµÄÖ´ÐÐ
         .  ......

Ubuntu Linux CHMÎļþÔĶÁÆ÷

CHM¸ñʽÊÇÔÚMSϱȽÏÁ÷ÐеÄÒ»ÖÖÎĵµ¸ñʽ£¬¾Ý˵ÊÇMSµÄ¶«Î÷¡£ÒÔǰÔÚLinuxÏÂÒª¿´CHMÎĵµºÜ·³ºÜ·³¡£¾­³£ÓбàÂë²»¶Ô£¬¸ñʽ֧³Ö´íÎóʲôµÄ¡£
ÒÔǰ³£Ó÷½·¨È磺ÓÃxchm¡¢ChmSee»òÕßFirefoxµÄCHM Reader²å¼þ¡£µ±È»Ò²Äܽâ¾öÒ»´ó²¿·ÖÎÊÌâ¡£
ÏÖÔÚÕýÊ½ÍÆ¼öÒ»ÖÖCHMä¯ÀÀÆ÷£ºGnochm£¬Gnochm»ùÓÚGtk+£¬ÔËÐпìËÙ£¬¶ÔÖÐÎÄÖ§³ÖÁ¼ºÃ£¬Ö§³ÖÈ«ÎÄË ......

»ùÓÚATMEL AT91RM9200µÄǶÈëʽLinuxÒÆÖ²±Ê¼Ç


  Ç°ÃæÀûÓÿª·¢°å´øµÄÏֳɵĶ«Î÷step by stepÈÃLinux 2.4.19ÔÚ¿ª·¢°åÉÏÅÜÆðÀ´ÁË£¬¶ÔÓÚ¿ª·¢µÄÁ÷³ÌÒ²ÓÐÁËÒ»¶¨µÄÈÏʶ¡£ÏÖÔÚÏë¶Ôÿһ²½½øÐÐÏêϸÉîÈëµÄ̽ÌÖ£¬ºÃºÃѧϰһÏ£¬°Ñ±Ê¼Ç¼Ç¼ÏÂÀ´£¬Ê¡µÃÍü¼ÇÁË¡£ÓÐЩÄÚÈÝÊÇ´Ó¿´¹ýµÄÊéÖÐÕªÒª¹ýÀ´µÄ£¬´ó²¿·ÖÊÇ×Ô¼ºÊµ¼ùºóµÄÐĵá£ÎÒÏë¼ÇµÃÏêϸµã£¬Ò²ºÃΪºóÃæ×ܽá´òºÃ»ù´¡¡£
------- ......

Linux(Ubuntu) ÖеÄÂÒÂë½â¾ö´óÈ«(´ýÐø)

   ÓÉÓÚLinux²»ÊÇÖйúÈË¿ª·¢µÄ£¬¿ª·¢¹ý³ÌÖÐÒ²²»ÊÇÒÔÖÐÎÄΪĸÓËäÓÐÖÐÎÄÓïÑÔ°ü£¬ÔÚÈí¼þ¼æÈÝÐÔÉϳöÏÖÖÐÎÄÂÒÂëÒ²ÔÚËùÄÑÃâ¡£ÎÒ³éÈ¡ÍøÂçÉÏǰÈ˵ľ­Ñ飬½áºÏ×Ô¼ºµÄÀí½â£¬½«ËûÃǼÓÒÔ×ܽᣬϣÍû¶ÔºóÀ´ÕßÓÐËù°ïÖú¡£
     1¡¢htmlÎļþÂÒÂ룻
        &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ