Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 <


Ïà¹ØÎĵµ£º

ÓÃLVS¹¹¼Ü¸ºÔؾùºâLinux¼¯ÈºÏµÍ³

¹Ù·½ÍøÕ¾£ºhttp://www.linuxvirtualserver.org/
°Ù¶È°Ù¿Æ£ºhttp://baike.baidu.com/view/645050.htm?fr=ala0_1_1
 
ת×Ô£ºhttp://server.csdn.net/n/20090827/4278.html
ÓÃLVS¹¹¼Ü¸ºÔؾùºâLinux¼¯ÈºÏµÍ³ linux lvs
ÓÃLVS¹¹¼Ü¸ºÔؾùºâLinux¼¯ÈºÏµÍ³ linux lvs
×÷ÕߣºÓຣ·¢
Ñ¡ÓõÄLVSʵ¼ÊÉÏÊÇÒ»ÖÖLinux²Ù×÷ÏµÍ³É ......

linux³£ÓÃÃüÁîС×ܽá

1.±ä¸üÓû§£º su root   »ò su - ×¢Ò⣨ÈôÖ»ÓÃsu£¬ÔòÖ»»»Óû§£¬²»»»shell£©¡£
2.´´½¨Îļþ¼Ð£º mkdir -m777 tool ´´½¨too²¢ÉèÖÃȨÏÞ mkdir -p tool2/tool3 Á¬¼¶´´½¨Îļþ¼Ð¡£
3.ɾ³ýÎļþ»òÎļþ¼Ð£º rm -r  tool2 µÝ¹éɾ³ý£¬Á¬Í¬×ÓĿ¼һÆðɾ³ý¡£ rm -fr ²»ÓÃÌáʾ£¬Ö±½ÓÇ¿ÖƵݹéɾ³ý¡£
4.Òƶ¯Ä¿Â¼£º mv -iv ......

À©´óVMwareÐéÄâ»úÖÐlinuxÓ²ÅÌ¿Õ¼ä

ΪVMwareÌí¼ÓÐéÄâÓ²ÅÌ
               VMware°²×°linuxµÄʱºòĬÈÏ·ÖÅäµÄ¿Õ¼äÊÇ4GB£¬¿ÉÄܻ᲻¹»£¬Õâ¸öʱºò¿ÉÒÔͨ¹ýÔö¼ÓÒ»¿éÐéÄâÓ²ÅÌ£¬½«/usr»òÆäËûÄÚÈÝ¿½±´¹ýÈ¥½â¾öÕâ¸öÎÊÌ⣺
´´½¨ÐéÄâÓ²ÅÌ
        1¡¢¹Ø±ÕV ......

linux I2CÇý¶¯·ÖÎö

I2CÊÇPhillips¿ª·¢µÄ2ÏߵĴ®ÐÐ×ÜÏßЭÒ顣ͨ³£Ó¦ÓÃÔÚǶÈëʽϵͳÖÐÈò»Í¬µÄ×é¼þͨÐÅ£¬PCÖ÷°å¿ÉÒÔͨ¹ýI2CÀ´Ó벻ͬµÄ´«¸ÐÆ÷ͨÐÅ¡£ÕâЩ´«¸ÐÆ÷ͨ³£±¨¸æ·çÉÈËٶȣ¬´¦ÀíÆ÷ζȺÍÕû¸öÓ²¼þϵͳµÄÐÅÏ¢£¬Õâ¸öЭÒéÒ²¿ÉÒÔÓÃÔÚRAM chipsÉÏ£¬Ïò²Ù×÷ϵͳÌṩDIMMµÄÐÅÏ¢¡£
ÔÚ2.0ʱI2CµÄkernelÔ´Âë²»ÔÚÄÚºËÀïµÄ£¬2.4Äں˰üÀ¨ÁËÒ»µã¶ÔI2CµÄÖ§³Ö ......

LinuxÖÐI2C×ÜÏßÇý¶¯Ìåϵ½á¹¹

×î½üÔÚ¿´Linux 2.6.21Äں˵ÄI2CÇý¶¯£¬Ò²ÔÚÍøÉϲéÁËÒ»ÏÂ×ÊÁÏ£¬ÓдíÒ²Óжԣ¬ÓÐЩÐĵ㬼ǼÏÂÀ´°É¡£ÀïÃæÈÏʶ»òÐí¶àÓв»µ±Ö®´¦£¬»¹¿ÒÇëÖ¸Õý¡£
 
1. I2C ЭÒé
 
 1.1  I2C×ÜÏß¹¤×÷Ô­Àí
      I2C×ÜÏßÊÇÓÉÊý¾ÝÏßSDAºÍʱÖÓSCL¹¹³ÉµÄ´®ÐÐ×ÜÏߣ¬¸÷ÖÖ±»¿ØÖÆÆ÷¼þ¾ù²¢ÁªÔÚÕâÌõ×ÜÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ