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

Linux shared library Loading function

Link from: http://www.faqs.org/docs/Linux-mini/C++-dlopen.html
//1. == main.cpp =============================================
// How to build?
// g++ -o main main.cpp -ldl
//=======================================================
#include <iostream>
#include <dlfcn.h>
int main() {
    using std::cout;
    using std::cerr;
    cout << "C++ dlopen demo\n\n";
    // open the library
    cout << "Opening hello.so...\n";
    void* handle = dlopen("./hello.so", RTLD_LAZY);
    if (!handle) {
        cerr << "Cannot open library: " << dlerror() << '\n';
        return 1;
    }
    // load the symbol
    cout << "Loading symbol hello...\n";
    typedef void (*hello_t)();
    hello_t hello = (hello_t) dlsym(handle, "hello");
    if (!hello) {
        cerr << "Cannot load symbol 'hello': " << dlerror() <<
            '\n';
        dlclose(handle);
        return 1;
    }
    // use it to do the calculation
    cout << "Calling hello...\n";
    hello();
    // close the library
    cout << "Closing library...\n";
    dlclose(handle);
}
// 2=====hello.cpp ========================================
// How to build?
// g++ -c -fPIC hello.cpp
// g++ -shared  -o hello.so
-fPIC hello.o
//======================================================
#include <


Ïà¹ØÎĵµ£º

linux¿ª»úÆô¶¯·þÎñÏê½â£¨RHϵ£©

http://179401.cn/read.php?21
acpid
ÅäÖÃÎļþ£º/proc/acpi/event
ĬÈ϶˿ڣºÎÞ
˵Ã÷£ºAdvanced Configuration and Power Interface£¬ÎªÌæ´ú´«Í³µÄAPM µçÔ´¹ÜÀí±ê×¼¶øÍƳö
µÄÐÂÐ͵çÔ´¹ÜÀí±ê×¼¡£
ÊÇ·ñÐèÒªÆô¶¯£ºÈç¹ûÄãÐèÒª¶ÔµçÔ´½øÐйÜÀí£¬ÄǾÍÐèÒªÆô¶¯¡£
anacron
ÅäÖÃÎļþ£º/etc/anacron
ĬÈ϶˿ڣºÎÞ
˵Ã÷£ºÒ»¸ö ......

dz̸ÐéÄâ»úϵÄlinuxÓëwindows»¥Áª

ÏëÒªÔÚÐéÄâ»úϵÄlinuxÓëwindows»¥Áª£¬×î¹Ø¼üµÄÖ»ÐèÒª3²½£º
1.Ò»¶¨ÒªÉèÖÃÐéÄâ»úµÄÍø¿¨ÎªÇŽÓģʽ£¬ÕÒ¸öÒ»¶¨²»ÄÜÍü¡£
2.ÉèÖÃlinuxϵÄipµØÖ·£¬ vi /etc/sysconfig/network-scripts/ifcfg-eth0
   DEVICE=eth0   #ÍøÂçÃû³Æ
   BOOTPROTO=static  #¾²Ì¬»ñÈ¡ipµØÖ·
   IPADD ......

ÎÒ¿ª·¢Linux·þÎñ³ÌÐòµÄ¹¤×÷»·¾³´îÅä

àÅ£¬ÕâÊÇºÍÆ½Í¬Ñ§µÄµãÌâ×÷ÎÄÁË£¬ºÇºÇ£¬Ëû·ÇÒªÁ˽âÎÒÊÇÔõô¿ª·¢Linux³ÌÐòµÄ£¬Ö÷ÒªÊÇÕâ¸ö¹¤×÷»·¾³ÊÇÈçºÎµÄ£¿
ԭʼÎÊÌâÈçÏ£º
ÎÊ£º
ÀÏʦ£¬¿ÉÒÔдһƪÎÄÕ½éÉÜÒ»ÏÂÈçºÎʹÓÃvim´î½¨ºÃÓõÄlinux¿ª·¢»·¾³Â𣿣¨±ÈÈçvimÈçºÎÉèÖÿì½Ý¼ü¿ÉÒÔ×öµ½Ò»¼ü±àÒëºÍÔËÐУ¬³£ÓõIJå¼þÈçºÎ°²×°µÈ£©
´ð£º
ÎÒ²»»áÓÃvim£¬Ò²´Ó²»Óá£
ÎÊ£º
ÌýË ......

Linux/Unix ³£ÓÃÃüÁî¶þ

ËÄ¡¢quota
1.×÷ÓÃ
quotaÃüÁîÓÃÀ´ÏÔʾ´ÅÅÌʹÓÃÇé¿öºÍÏÞÖÆÇé¿ö£¬Ê¹ÓÃȨÏÞ³¬¼¶Óû§¡£
2.¸ñʽ
quota [£­g][£­u][£­v][£­p] Óû§Ãû ×éÃû
3.²ÎÊý
£­g£ºÏÔʾÓû§ËùÔÚ×éµÄ´ÅÅÌʹÓÃÏÞÖÆ¡£
£­u£ºÏÔʾÓû§µÄ´ÅÅÌʹÓÃÏÞÖÆ¡£
£­v£ºÏÔʾûÓзÖÅä¿Õ¼äµÄÎļþϵͳµÄ·ÖÅäÇé¿ö¡£
£­p£ºÏÔʾ¼ò»¯ÐÅÏ¢¡£
4.Ó¦ÓÃʵÀý
ÔÚÆóÒµÓ¦ÓÃÖдÅÅÌÅä ......

Linux·¢Ðаæ±È½Ï

CentOS Èç¹ûÄãϲ»¶RHµÄ²úÆ·£¬¶øÄãÓÖÌÖÑáFC4µÄÓ·Ö×£¬ÄÇô³¢ÊÔÒ»ÏÂCentOS°É£¬µ±Äã´ò¿ªÕâ¸ö·¢ÐаæµÄʱºò£¬ÏàÐÅÄã»á´ó½ÐÒ»Éù£º"Õâ²»¾ÍÊÇRedhatô"£¬Êǵģ¬Õâ¸ö°æ±¾ÍêȫʹÓÃRHµÄsrpmÉú³Éϵͳ£¬¶øÇÒÐÔÄÜÒ²ºÜ²»´í¡£
Debian Õâ¸ö·¢Ðа汾ÔÚËùÓз¢Ðа汾ÀïÃæ¿°³Æ×îÑϽ÷µÄ£¬aptÈí¼þ°ü¹ÜÀí»úÖÆ¿ÉÒÔÈÃÓû§¿ìËÙ½¨Á¢ÆðÀ´¸ßЧµÄ²Ù×÷ϵͳ¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ