¡¾ÀíÂÛ֪ʶƪ¡¿Linux»ìºÏ±à³Ì+log4cpp
ÓÉÓÚҪʹÓõ½log4cppµÄ¿â£¬¶ølog4cµÄ×ÊÁÏÊǷdz£µÄÉÙ£¬Ò²ÀÁµÃÈ¥Ñо¿ËüµÄÓ÷¨£¬ÓÚÊǾ;ö¶¨ÊÔÊÔ»ìºÏ±à³ÌÕßÍæÒâ¡£
Ê×ÏÈÏÈÒýÓÃÏÂC++ËüµÄfather: StroustrupµÄһƪÎÄÕ¡¶C++ Style and Technique FAQ¡·£¨http://www2.research.att.com/~bs/bs_faq2.html£©ÀïµÄһС¸öƬ¶Î£º
Just declare the C function ``extern "C"'' (in your C++ code) and call it (from your C or C++ code). For example:
// C++ code
extern "C" void f(int); // one way
extern "C" { // another way
int g(double);
double h();
};
void code(int i, double d)
{
f(i);
int ii = g(d);
double dd = h();
// ...
}
The definitions of the functions may look like this:
/* C code: */
void f(int i)
{
/* ... */
}
int g(double d)
{
/* ... */
}
double h()
{
/* ... */
}
Note that C++ type rules, not C rules, are used. So you can't call function declared ``extern "C"'' with the wrong number of argument. For example:
// C++ code
void more_code(int i, double d)
{
double dd = h(i,d); // error: unexpected arguments
// ...
}
Just declare the C++ function ``extern "C"'' (in your C++ code) and call it (from your C or C++ code). For example:
// C++ code:
extern "C" void f(int);
void f(int i)
{
// ...
}
Now f() can be used like this:
/* C code: */
void f(int);
void cc(int i)
{
f(i);
/* ... */
}
Naturally, this works only for non-member functions. If you want to call member functions (incl. virtual functions) from C, you need to provide a simple wrapper. For example:
// C++ code:
class C {
// ...
virtual double f(int);
};
extern "C" double call_C_f(C* p, int i) // wrapper function
{
return p->f(i);
}
Now C::f() can be used like this:
/* C code: */
double call_C_f(struct C* p, int i);
void ccc(struct C* p, int i)
{
double d = call_C_f(p,i);
/* ... */
}
If you want to call overloaded functions from C, you must provide wrappers with distinct names for th
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
¶¯Ì¬¿â*.soÔÚlinuxÏÂÓÃcºÍc++±à³Ìʱ¾³£»áÅöµ½£¬×î½üÔÚÍøÕ¾ÕÒÁ˼¸ÆªÎÄÕ½éÉܶ¯Ì¬¿âµÄ±àÒëºÍÁ´½Ó£¬×ÜËã¸ã¶®ÁËÕâ¸ö֮ǰһֱ²»Ì«Á˽âµÃ¶«¶«£¬ÕâÀï×ö¸ö±Ê¼Ç£¬Ò²ÎªÆäËüÕýΪ¶¯Ì¬¿âÁ´½Ó¿â¶ø¿àÄÕµÄÐÖµÜÃÇÌṩһµã°ïÖú¡£
1¡¢¶¯Ì¬¿âµÄ±àÒë
ÏÂÃæÍ¨¹ýÒ»¸öÀý×ÓÀ´½éÉÜÈçºÎÉú³ÉÒ»¸ö¶¯Ì¬¿â¡£ÕâÀïÓÐÒ»¸öÍ·Îļþ£ºso_test.h£¬Èý¸ö.cÎļþ£ºtes ......
·½·¨Ò»¡¢LR + SiteScope
·½·¨¶þ¡¢Ê¹ÓÃrstatd°ü
1¡¢ÏÂÔØrpc.rstatd-4.0.1.tar.gz
2¡¢½âѹËõ
tar -zxvf rpc.rstatd-4.0.1.tar.gz
3¡¢ÅäÖÃ
./configure
4¡¢±àÒë
make
5¡¢°²×°
make install
6¡¢Æô¶¯
rpc.rstatd
7¡¢ÔÚLoadRunnerÖÐÌí¼Ó¼ÆÊýÆ÷
average load :ÔÚ¹ýÈ¥µ ......
½ñÌìÔÚÔËÐÐsphinxµÄʱºò£¬Ìáʾ˵
./searchd: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
ÎÒ±àÒë°²×°µÄʱºòÃ÷Ã÷ÓÐÖ¸¶¨mysqlµÄlib¿â°¡£¬ÉÏÍø²éµ½ÊÇÒòΪmysqlµÄlib²»ÔÚϵͳµÄlib·¾¶ÖУ¬½â¾ö°ì·¨ÈçÏ£º
ÔÚ/etc/ld.so.confÏÂÃæ¼ÓÒ»ÐÐ/usr/loc ......
ÕýÔò±í´ïʽ(regular expression)
[code:1]ÕýÔò±í´ïʽ(regular expression)
--------------------------------------------------------------------------------
¹Ø¼ü×Ö£º ÕýÔò±í´ïʽ£¬Regular Expression
ÔÖø£ºÐ¦ÈÝ
´´×÷ÓÚ£º2004Äê05ÔÂ03ÈÕ
×îºó¸üУº2004Äê05ÔÂ04ÈÕ 21:12
°æÈ¨ÉùÃ÷£ºÊ¹Óô´×÷¹«ÓðæÈ¨ÐÒ ......