¡¾ÀíÂÛ֪ʶƪ¡¿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
Ïà¹ØÎĵµ£º
¶¯Ì¬¿â*.soÔÚlinuxÏÂÓÃcºÍc++±à³Ìʱ¾³£»áÅöµ½£¬×î½üÔÚÍøÕ¾ÕÒÁ˼¸ÆªÎÄÕ½éÉܶ¯Ì¬¿âµÄ±àÒëºÍÁ´½Ó£¬×ÜËã¸ã¶®ÁËÕâ¸ö֮ǰһֱ²»Ì«Á˽âµÃ¶«¶«£¬ÕâÀï×ö¸ö±Ê¼Ç£¬Ò²ÎªÆäËüÕýΪ¶¯Ì¬¿âÁ´½Ó¿â¶ø¿àÄÕµÄÐÖµÜÃÇÌṩһµã°ïÖú¡£
1¡¢¶¯Ì¬¿âµÄ±àÒë
ÏÂÃæÍ¨¹ýÒ»¸öÀý×ÓÀ´½éÉÜÈçºÎÉú³ÉÒ»¸ö¶¯Ì¬¿â¡£ÕâÀïÓÐÒ»¸öÍ·Îļþ£ºso_test.h£¬Èý¸ö.cÎļþ£ºtes ......
1¡¢Linux »ù´¡
°²×°Linux²Ù×÷ϵͳ LinuxÎļþϵͳ Linux³£ÓÃÃüÁî LinuxÆô¶¯¹ý³ÌÏê½â ÊìϤLinux·þÎñÄܹ»¶ÀÁ¢°²×°Linux²Ù×÷ϵͳ Äܹ»ÊìÁ·Ê¹ÓÃLinuxϵͳµÄ»ù±¾ÃüÁî ÈÏʶLinuxϵͳµÄ³£Ó÷þÎñ°²×°Linux²Ù×÷ϵͳ Linux»ù±¾ÃüÁîʵ¼ù ÉèÖÃLinux»·¾³±äÁ¿ ¶¨ÖÆLinuxµÄ·þÎñ Shell ±à³Ì»ù´¡Ê¹ÓÃvi±à¼Îļþ ʹÓÃEmacs±à¼Îļþ ʹÓÃÆäËû±à ......
·½·¨Ò»¡¢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 :ÔÚ¹ýÈ¥µ ......
Technorati ±êÇ©: linux,at Ãû³Æ : at
ʹÓÃȨÏÞ : ËùÓÐʹÓÃÕß
ʹÓ÷½Ê½ : at -V [-q queue] [-f file] [-mldbv] TIME
˵Ã÷ : at ¿ÉÒÔÈÃʹÓÃÕßÖ¸¶¨ÔÚ TIME Õâ¸öÌØ¶¨Ê±¿ÌÖ´ÐÐij¸ö³Ìʽ»òÖ¸ÁTIME µÄ¸ñʽÊÇ HH:MMÆäÖÐµÄ HH ΪСʱ£¬MM Ϊ·ÖÖÓ£¬ÉõÖÁÄãÒ²¿ÉÒÔÖ¸¶¨ am, pm, midnight, noon, teatime(¾ÍÊÇÏÂÎç 4 µãïñ ......