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

¸ß¼¶Linux³ÌÐòÉè¼ÆµÚÒ»Õ£ºÈëÃÅ

1¡¢ÓÃGCC±àÒë
1.1¡¢´´½¨Ô´Îļþ
(main.c) C Ô´Îļþ - main.c
#include
#include “reciprocal.hpp”
int main (int argc, char **argv)
{
    int i;
    i = atoi (argv[1]);
    printf (“The reciprocal of %d is %g\n”, i, reciprocal (i));
    return 0;
}
(reciprocal.cpp) C++ Ô´Îļþ - reciprocal.cpp
#include
#include “reciprocal.hpp”
double reciprocal (int i) {
    // I should be non-zero.
    assert (i != 0);
    return 1.0/i;
}
(reciprocal.hpp) Í·Îļþ - reciprocal.hpp
#ifdef __cplusplus
    extern “C” {
#endif
    extern double reciprocal (int i);
#ifdef __cplusplus
    }
#endif
1.2¡¢±àÒëÔ´Îļþ
±àÒëmain.c:
% gcc -c main.c
±àÒëreciprocal.cpp:
% g++ -c reciprocal.cpp
²ÎÊý-IÖ¸¶¨ËÑË÷Í·ÎļþµÄλÖá£
ĬÈÏÇé¿öÏ£¬GCCÔÚµ±Ç°Îļþ¼Ð¼°±ê×¼¿âµÄÍ·ÎļþËùÔÚµÄÎļþ¼ÐÀ´ËÑË÷Í·Îļþ¡£
% g++ -c -I ../include reciprocal.cpp
¿ÉÒÔÓòÎÊý-DÔÚÃüÁîÐÐÉ趨ºê(macro)£¬²¢ÇÒ¿ÉÒÔÉ趨ºêµÄÖµ
¶ÔÓÚÈçϳÌÐòdefinemacro.c:
#include "stdio.h"
#include "stdlib.h"
int main(int argc, char** argv){
        int i = 3;
#ifdef CHANGEVALUE
        i = 4;
#endif
        printf("i = %d\n", i);
        printf("PT = %f\n", PI);
}
Èç¹û±àÒëʱÃüÁîÐÐΪgcc definemacro.c£¬»á±¨‘PI’ undeclared´íÎó¡£
Èç¹û±àÒëʱÃüÁîÐÐΪgcc -D PI=3.14 definemacro.c£¬ÔòÊä³öÈçÏ£º
i = 3
PT = 3.140000
Èç¹û±àÒëʱÃüÁîÐÐΪgcc -D PI=3.14 -D CHANGEVALUE definemacro.c£¬ÔòÊä³öÈçÏ£º
i = 4
PT = 3.140000
¿ÉÒÔÓÃGCC±àÒëʱÓÅ»¯´úÂë.
% g++ -c -O2 reciprocal.cpp
1.3¡¢Á´½Ó¶ÔÏóÎļþ
g++¿ÉÒÔ½«.o¶ÔÏóÎļþÁ´½Ó³É³ÌÐò
% g++ -o reciprocal main.o reciprocal.o
Èç¹ûÏëÁ´½ÓÆäËû¿âÎļþ£¬ÔòÓòÎÊý-I
ÀýÈçÓûÁ´½Ó¿âlibpam.a£¬ÔòÓÃÈçÏÂÃüÁîÐУ¬±àÒëÆ÷»á×Ô¶¯¼ÓÉÏǰ׺libºÍºó׺.a
% g++ -o reciprocal mai


Ïà¹ØÎĵµ£º

linux ÐźŴ¦Àí µÄѧϰ

      linuxϵͳÖжÔÐźŵĴ¦ÀíÖ÷ÒªÊÇsignal ºÍsigactionº¯ÊýÀ´Íê³É£¬pauseÓÃÀ´ÏìÓ¦ÈκÎÐźţ¬µ«²»×öÈκδ¦Àí¡£
      1¡£signalº¯Êý
¸Ãº¯ÊýÓÃÀ´ÉèÖýø³ÌÔÚ½Óµ½ÐźŵĶ¯×÷¡£¿ÉÒÔ man signal²é¿´¾ßÌåÓ÷¨£¬ÏÖÔÚ¶ÔÆäÓ÷¨ÑÝʾ£¬
SIGKILL SIGSTOPÊDz»Äܱ»²¶×½ºÍºöÂÔµÄÐź ......

Linux device driver 3 ±Ê¼Ç Ö® ÄÚ´æÓ³Éä

½ñÌì×Ô¼ºÑ§Ï° LinuxÉ豸Çý¶¯³ÌÐò µÚÈý°æ µÚ15Õ ÄÚ´æÓ³ÉäºÍDMA. ¸Ð¾õÓеã³ÔÁ¦¡£Ö÷ÒªÊǶÔÄÚ´æÓ³ÉäºÜ¶àÊõÓïºÍ¸ÅÄî²»ÊǺÜÇå³þ£¬Àí½âÆðÀ´Óеã·Ñ¾¢¡£
ºóÀ´½áºÏÓ¢ÎÄÔ­°æ£¬¾²ÏÂÐÄÀ´×Ðϸѧϰ£¬²ÅËãÊÇÓÐÁËÒ»µã½øÕ¹¡£
ÏÖÔÚÔÚÕâÀï×öÒ»¸ö±Ê¼Ç£¬ÒÔ±¸ÒÔºó¸´Ï°Óá£
µÍ¶ËÄÚ´æºÍ¸ß¶ËÄÚ´æ
ÊéÖеÄͼ15-1ÓеãÎóµ¼ÈË¡£Í¼Öн« ÄÚºËÐéÄâµØÖ· ºÍ ......

֪ʶС¼Ç(linux)

1)webmin
    WebminÊÇÄ¿Ç°¹¦ÄÜ×îÇ¿´óµÄ»ùÓÚWebµÄUnixϵͳ¹ÜÀí¹¤¾ß¡£¹ÜÀíԱͨ¹ýä¯ÀÀÆ÷·ÃÎÊWebminµÄ¸÷ÖÖ¹ÜÀí¹¦Äܲ¢Íê³ÉÏàÓ¦µÄ¹ÜÀí¶¯×÷¡£Ä¿Ç°
WebminÖ§³Ö¾ø´ó¶àÊýµÄUnixϵͳ£¬ÕâЩϵͳ³ýÁ˸÷ÖÖ°æ±¾µÄlinuxÒÔÍ⻹°üÀ¨£ºAIX¡¢HPUX¡¢Solaris¡¢Unixware¡¢Irix
ºÍFreeBSDµÈ¡£
    Webmin ÈÃÄúÄÜ ......

תÔØ ½ñÌìΪÎÒµÄGodaddy LinuxÖ÷»ú¿ªÍ¨SSH

ÒÔÇ°GodaddyµÄLinuxµÄÖ÷»úÊDz»ÄÜ¿ªÍ¨SSHµÄ£¬Ö»ÓÐVDS¡¢VPS¡¢¶ÀÁ¢Ö÷»ú¿ÉÒÔ¿ªÍ¨£¬Ç°¼¸ÌìÔÚºǫ́ÉÏ¿´µ½ÓÐÁËSSHÕâ¸ö¹¦ÄÜ£¬²»¹ýÐèҪɾ³ýËùÓеÄÊý¾Ý¿â£¬²Å¿ÉÒÔ½øÐпªÍ¨µÄ²½Ö衣ǿÁÒ½¨Ò鱸·ÝÊý¾Ý¿â¼°ÍøÕ¾£¡£¡
ɾ³ýÊý¾Ý¿â¾Í²»ÓÃ˵ÁË¡«ºÜ¼òµ¥¡£
²½Ö裺½øÈë¿Õ¼ä¹ÜÀíÃæ°å£¬Ñ¡ÔñSettingsÑ¡ÏϵÄSSHÑ¡ÏÈçÏÂͼ£º
godaddyssh-thumb. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ