LinuxÖÐ ¾²Ì¬¿âºÍ¹²Ïí¿â
1£® ´´½¨Ä¿Â¼
mkdir –p test/sub
2£® ÔÚ×ÓĿ¼sub/ϱàдhello.cºÍhello.h
/*****hello.c*****/
#include <stdio.h>
#include “hello.h”
void hello()
{
printf(“Hello!\n”);
}
/*****hello.h*****/
#include <stdio.h>
void hello();
3£® ±àÒëÁ´½Ó/´ò°ü
gcc –c hello.c –o hello.o
ar cqs libhello.a hello.o
4£® ÔÚÖ÷Ŀ¼test/ϱàдmain.c
#include <stdio.h>
#include “sub/hello.h”
int main()
{
hello();
retrun 0;
}
5£® ±àÒëÁ´½Ó
gcc –c main.c –o main.o
gcc main.o –o main.exe –L “sub/” –lhello #dynamically linked (uses shared libs)
»ògcc main.o –o main.exe –static –L “sub/” –lhello # statically linked
--------------------------------------------------------------------------------------------------
.a(archive) ¾²Ì¬¿â
.so(shared object) ¹²Ïí¿â
¾²Ì¬¿âÖ»ÔÚ³ÌÐòÁ´½ÓʱÆð×÷Óã¬×îÖÕµÄÖ´ÐгÌÐòÍÑÀ뾲̬¿âÔËÐС£
¹²Ïí¿âÔÚ³ÌÐòÔËÐÐʱÆð×÷Óá£
--------------------------------------------------------------------------------------------------
¹²Ïí¿âµÄ±àºÅÔ¼¶¨
¸ñʽlibrary_name.major_num.minor_num.patch_num
ÀýÈçlibminigui.so.2.0.0
major_num:µ±¿âµÄ±ä»¯´ïµ½Á˺ÍÒÔÇ°µÄ°æ±¾²»ÄܼæÈݵijɶ¼Ê±¾ÍÒªÔö¼ÓÖ÷°æ±¾ºÅ
minor_num:µ±¿âÓÐÁËб仯ÓÖÄܺÍÒÔÇ°µÄ°æ±¾±£³Ö¼æÈÝʱ¾ÍÖ»¸Ä±ä´Î°æ±¾ºÅ
patch_num:ΪÐÞÕý¿âÖеĴíÎó¶ø½øÐеĸĶ¯Ôò»á¸Ä±ä²¹¶¡¼¶±ðºÅ£¬ËüÓÖ½Ð×ö·¢ÐкÅ(release number)¡£
ÒÔ_gºÍ_p½áβµÄ¿â£º
ÀýÈçlibminigui_g.aºÍlibminigui_p.a
Ëü
ÃÇÊÇ»ù±¾¿âµÄÌØÊâ°æ±¾£¬»ù±¾¿âΪlibminigui.a¡£ÒÔ_g½áβµÄ¿âÊǵ÷ÊԿ⣬±àÈëÁËÌØÊâµÄ·ûºÅºÍ¹¦ÄÜ£¬Ôö¼ÓÁ˶ԲÉÓÃÁËÕâ¸ö¿âµÄÓ¦ÓóÌÐòµÄµ÷ÊÔ¹¦
ÄÜ¡£ÒÔ_p½áβµÄ¿âÊÇ´úÂëÆÊÎö¿â(profiling)£¬ËüÃÇ°üº¬µÄ´úÂëºÍ·ûºÅÄܽøÐи´ÔӵĴúÂëÆÊÎöºÍÐÔÄÜ·ÖÎö¡£ÄãÈç¹ûʹÓÃÁËÕâÁ½Àà¿â£¬Ò»µ©Íê³ÉÁ˵÷ÊÔºÍ
ÆÊÎ
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
ÎÄÕÂÑ¡È¡µÄÀý×ӷdz£¼òµ¥£¬ÉÏÊÖÈÝÒ×£¬Ö»ÊÇΪÁ˽²Êö¾²Ì¬Ó붯̬Á´½Ó¿âµÄÉú³ÉºÍÁ´½Ó¹ý
³Ì£¬»¹ÓÐËûÃÇÖ®¼äµÄÇø±ð¡£ÒÔÏÂÀý×ÓÔÚ gcc 4.1.1 ÏÂ˳Àûͨ¹ý¡£
ÎļþÔ¤ÀÀ
ÎļþĿ¼Ê÷ÈçÏ£¬ÈçÄãËù¼û£¬·Ç³£¼òµ¥¡£
libtest/
|-- lt.c
|-- lt.h
`-- test. ......
ϵͳҪÇó£º
¡¡¡¡Äڴ棺ÍƼö1G
¡¡¡¡Swap·ÖÇø£ºÉèΪÄÚ´æµÄ2±¶
¡¡¡¡/tmp´ÅÅ̿ռ䣺400MBÒÔÉÏÈý
¡¡¡¡´ÅÅ̿ռ䣺Èí¼þ3.5G Êý¾Ý1.2G
¡¡¡¡ËùÐèÈí¼þ£º
¡¡¡¡SuSE Linux10 for x86
¡¡¡¡Oracle database 10gR2 for Linux32
¡¡¡¡Orarun-1.8-109.15.i586.rpmÈí¼þ°ü£¬¿ÉÒÔ´Óhttp://Ftp.novell.com/partners/Oracle/sels-9ÏÂÔØ
&n ......