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

linux¶àÏ̱߳à³É - Linux/UnixÉçÇø / ³ÌÐò¿ª·¢Çø

#include<stdio.h>
#include<stdlib.h>
#include<pthread.h>

void *first()
{
printf("first pthread-----ABC\n");
}

void *second()
{
printf("second pthread-----ABC\n");
}

int main()
{
printf("mian pthread----ABC\n");
pthread_t fthread;
pthread_t sthread;

pthread_create(&fthread,NULL,first,NULL);
pthread_create(&sthread,NULL,second,NULL);

pthread_join(fthread,NULL);
pthread_join(sthread,NULL);
return 0;
}

ÎÒ±àÒëÌáʾ´íÎóÈçÏÂ
fily@zhaoyf:/media/work/develop/iscsitarget/usr$ gcc -o thread thread.c
/tmp/ccRbUIwW.o: In function `main':
thread.c:(.text+0x4e): undefined reference to `pthread_create'
thread.c:(.text+0x66): undefined reference to `pthread_create'
thread.c:(.text+0x74): undefined reference to `pthread_join'
thread.c:(.text+0x82): undefined reference to `pthread_join'
collect2: ld returned 1 exit status

¸ßÊÖ°ïæ£¬ÎÒ´íÔÚÄÄÀïÁË£¿
ÎÒʹÓõÄÊÇdebian5linux{{


Ïà¹ØÎÊ´ð£º

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

¡¾±±¾©¡¿ÕÐÆ¸LinuxÈí¼þÑз¢¸ß¼¶¹¤³Ìʦ

¾ßÌåְλҪÇó£º
1. ´óѧ±¾¿ÆÒÔÉÏѧÀú£¬¼ÆËã»úÏà¹Ø×¨Òµ±ÏÒµ£»
2. ÊìϤTCP/IPЭÒé¡¢SocketÍøÂç±à³Ì¡¢¶àÏ̱߳à³Ì£»
3. ¾«Í¨LinuxÏÂC/C++ÓïÑÔ±à³Ì¡¢GCC±àÒëÆ÷¡¢gdbµ÷ÊÔÆ÷µÄʹÓã¬ÊìϤMakefileºÍShell£»
4. Á˽âÈí¼þ¿ ......

ÇóÖú linux¹Û¿´ÊÓÆµÎÊÌâ

ÎÒÊÇlinux 5¡£4 redhat°æ±¾ ×°²»ÉÏadobe ÇóÖú¸÷λ¸ßÊÖÖ¸µã

  Ò»µãÐÅÏ¢¶¼²»¸ø Ë­ÖªµÀÔõô»ØÊ°¡
¶àÉÏÍøËÑËÑ °²×°Ö®Ç°ÏÈ¿´¿´Èí¼þµÄÒªÇóÒÔ¼°READMEµÈ˵Ã÷


32λ°æµÄÊÇ¿ÉÒÔ×°µÄ£¬64λµÄ»¹² ......

QT linux open - ÒÆ¶¯Æ½Ì¨ / Qt¿ª·¢

ÇëÎʸ÷룬ÎÒÏÖÔÚÐèÒªÔÚQTϵ÷ÓÃlinuxϵÄopenº¯Êý£¬ÇëÎʸ÷λ´óÏÀÔõôдѽ£¿
ÒòΪÎÒÐèÒªopenº¯Êý·µ»ØµÄfdÖ¸Õë
include ÏàÓ¦µÄÍ·Îļþ£¬QLibrary¼ÓÔØÏàÓ¦µÄ¿â£¬»òÕß¾²Ì¬Á¬½Ó½øÈ¥¡£
È»ºótypdef¶¨Ò庯ÊýÀàÐÍ£¬È»ºóinv ......

linux ȨÏÞÉèÖõÄÎÊÌâ - Web ¿ª·¢ / Apache

ÔÚubuntuÉϴÁË·þÎñÆ÷£¬¸ùĿ¼Ϊ/var/www£¬Ê¹ÓÃphp½Å±¾ÔÚ/var/www/htmlÎļþ¼ÐÏÂÉú³ÉÁËÎļþ¼ÐºÍÎļþ£¬Éú³ÉµÄ¸ñʽÊÇ/var/www/html/123456/sss.html£¬Éú³Éºó²é¿´htmlÎļþ¼ÐµÄȨÏÞÊÇwww-data£¬ÎÒÖ´ÐÐphpµÄɾ³ý½Å±¾µÄʱ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ