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

linux systemº¯ÊýÔõôÓÃ

ÎÒÓÃÁË£¬µ«³ö´íÁË
³ÌÐòΪ
#include <stdlib.h>
int main()
{
system("ls /etc/");
return 0;
}
Óà gcc -o test test.cpp ±àÒëºó±¨´í
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:77: undefined reference to `main'
collect2: ld returned 1 exit status

Ôõô½â¾ö£¿¼±°¡
ÓÃg++,Èç¹ûÓÃgcc±ØÐë¼Ó-lstdc++

ÒýÓÃ
ÓÃg++,Èç¹ûÓÃgcc±ØÐë¼Ó-lstdc++


²»Ðа¡¸çÃÇ£¬»¹ÓÐÆäËûµÄ·½·¨Â

ʹÓÃgcc  -g  -o  test  test.c ÊÔÊÔ¿´¡£


ÁíÍâÄãµÄmainº¯Êý²ÎÊý²»¶Ô£¬±ê׼д·¨ÊÇ£ºint main( int argc, char * argv [] )


g++ -o test test.cpp

Èç¹ûÒªÓÃgcc

gcc -o test test.cpp -lstdc++

ÐÖµÜÃÇÎҷdz£¶Ô²»Æð´ó¼Ò£¬ÎÒ°Ñmain д³ÉÁËmian¡£¡£¡£¡£¡£¡£¡£¡£¡£
É¢·ÛÉ¢·Û


Ïà¹ØÎÊ´ð£º

Linux Ŀ¼ÎÊÌâ

LinuxÐÂÊÖ£¬Çë´ó¸ç´ó½ã²»Òª¼ûЦ¡£

ÎÒÓÃrootÓû§µÇ¼µ½Linuxϵͳ¡£ÔÚ¸ùĿ¼ÏÂÃæ½¨ÁËĿ¼dir1£¬ºóÓÃÃüÁîcd /dir1½øÈëµ½dir1Ŀ¼Ï£¬È»ºóÔÙÓÃmkdir dir2½¨Á¢ÁËĿ¼dir2 £¬ÔÙºóÀ´ÓÃÃüÁîcd /dir2ÊÇ£¬ÌáʾΪ£º-bush ......

Linuxϰ²×°ÎÊÌâ

Ô­ÏȵÄGCC°æ±¾Îª4.1.2,ÎÒÖØÐ±àÒë°²×°ÁËGCC4.3.2£¬µ«ÊDZàÒëÍê³ÌÐòÔËÐгÌÐòʱ»á³öÏÖversion `GLIBCXX_3.4.9' not found Õâ¸öÎÊÌ⣬ÎÒ²»Ì«Ã÷°×Ôõô»ØÊ£¬Çë¸÷λ´óϺָµãһϡ£
ÊÖ¶¯ÔÙ×°Ò»´Îglibc*_3.4.9

ÕâÊÇÎ ......

LinuxÈçºÎÏñwindowsÄÇÑù¸øÎļþ¼ÐÌí¼ÓÓû§

ÎÒµÄÒâ˼ÊÇ£º

ÔÚ²»¸ü¸ÄÔ­À´µÄÎļþ¼ÐËùÓÐÈË£¬ËùÓÐ×飬ÆäËûÈËȨÏÞµÄÇé¿öÏ£¬µ¥¶À¸øÎļþ¼ÐÊÚȨijÓû§

±ÈÈç/var/www Õâ¸öÎļþ¼Ð£¬Ô­À´ÏµÍ³ÓÐĬÈϵÄÊôÖ÷ºÍÊô×飬ÎÒÏÖÔÚ²»ÏëÈ¥¸ÄËüÔ­À´µÄÉ趨£¬Ö»ÊÇÏë¸øËüÔö¼ ......

Linux ½ø³ÌÎÊÌâ

linux Ͻø³Ì´´½¨¡£
ʹÓÃvfork() º¯Êý´´½¨ÁË×Ó½ø³Ìºó£¬×Ó½ø³ÌÏÈÐÐÖ´ÐУ¬ÔÚ×Ó½ø³Ìµ÷ÓÃexit»òexec֮ǰ¸¸½ø³Ì´¦ÓÚʲô״̬£¿£¿
²»ÖªµÀ£»Ê×ÏÈδ±ØÊÇ×Ó½ø³ÌÏÈÖ´ÐУ»µÚ2¸¸½ø³ÌÒ²´¦ÓÚÖ´ÐÐ״̬£»ÖÁÓÚ¸¸½ø³Ìµ½µ××öʲô£»¿´´ ......

linux ÄÚ´æ³õʼ»¯

linux³õʼ»¯Ê±°ÑÖ§³ÖµÄÎïÀíÄÚ´æ¶¼Ó³Éäµ½page tableÖУ¬Ö®ºó½ø³ÌÐèÒªÄÚ´æÊ±£¬Ò²ÊÇÓ³Éäµ½Õâ¸öÎïÀíÄÚ´æÖУ¬Èç´Ë˵À´£¬linux³õʼ»¯Ê±´´½¨µÄpage tableºÍ½ø³ÌÖд´½¨µÄpage tableÖ¸Ïòͬһ¿éÎïÀíÒ³ÃæÂð£¿ÕâÑù×öµÄÄ¿µÄÊÇʲô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ