LinuxÏÂC¿ª·¢Ö®gcc,gdbµÄʹÓÃ
gcc£¬gdbµÄʹÓÃ
×÷Õߣºzccst
ÉÏÖÜÎåÔÚͼÊé¹Ý½èÁËÒ»±¾¡¶LinuxÈí¼þ¹¤³Ìʦ£¨CÓïÑÔ£©ÊµÓý̡̳·£¬ÈÃÎÒÊÕ»ñÁ¼¶à¡£²»½ö½öÊÇÊéÖеÄ֪ʶ£¬»¹ÓжÔ֪ʶÌåϵºÍ¼Ü¹¹ÈÏʶµÄÉîÈë¡£
LinuxÏÂC¿ª·¢£º
1£¬gcc,gdbµÄʹÓá£
2£¬MakefileÎļþµÄ±àд¡£
3£¬ÏµÍ³º¯ÊýµÄʹÓÃ
4£¬Îļþ²Ù×÷
5£¬´®ÐÐͨÐÅ
6£¬½ø³Ì¿ØÖÆ
7£¬½ø³Ì¼äͨÐÅ
8£¬ÍøÂç±à³Ì
9£¬Í¼Ðαà³Ì
10£¬Êý¾Ý¿â±à³Ì
11£¬qt±à³Ì
LinuxÏÂC¿ª·¢Ö®——gcc£¬gdbµÄʹÓÃ
gcc±àÒëÆ÷
Ç°Ìá±à¼¹¤¾ßµÄʹÓãºvi vim Emacs¡£
vi hello.c
Ò»¡¢³£¼û²½Ö裺
¶ÔÓÚÖ»ÓÐÒ»¸öÔ´ÎļþµÄ¼òµ¥³ÌÐò£¬³£³£Ö»ÓбàÒ룬ÔËÐÐÁ½²½¡£
1£¬gcc hello.c -o hello
2£¬./hello
¶þ¡¢gcc±àÒëÁ÷³Ì
gcc and g++·Ö±ðÊÇgnuµÄc & c++±àÒëÆ÷ gcc/g++ÔÚÖ´ÐбàÒ빤×÷µÄʱºò£¬×ܹ²ÐèÒª4²½
hello.c (Ô´Âë)
hello.i Éú³ÉÔ¤´¦ÀíÎļþ£¬
²ÎÊýÊÇ“-E”£¬°Ñhello.c -> hello.i¡£ÍêÕûÃüÁîΪgcc hello.c -o hello.i -E
hello.s ±àÒëÉú³É»ã±àÎļþ£¬
²ÎÊýÊÇ“-S”£¬°Ñhello.i -> hello.s¡£ÍêÕûÃüÁîΪgcc hello.i -o hello.s -S
hello.o ½«»ã±àÎļþ±äΪĿ±ê´úÂ룬
²ÎÊýÊÇ“-c”£¬°Ñhello.s -> hello.o¡£ÍêÕûÃüÁîΪgcc hello.s -o hello.o -c
hello Á´½ÓÄ¿±ê´úÂ룬Éú³É¿ÉÖ´ÐгÌÐò£¬
²ÎÊýÎÞ£¬ °Ñhello.o -> hello¡£ ÍêÕûÃüÁîΪgcc hello.o -o hello
./hello (ÔËÐÐ)
Èý¡¢gccµÄÖ÷Òª²ÎÊý
1£¬×ÜÌå²ÎÊý
-E Ö»½øÐÐÔ¤±àÒ룬²»×öÆäËû´¦Àí
-S Ö»ÊDZàÒë²»»ã±à£¬Éú³É»ã±à´úÂë
-c Ö»ÊDZàÒë²»Á´½Ó£¬Éú³ÉÄ¿±êÎļþ“.o”
-o file °ÑÊä³öÎļþÊä³öµ½fileÀï
-g &nbs
Ïà¹ØÎĵµ£º
ת×Ô£ºhttp://dev.csdn.net/article/29/29329.shtm
¹ØÓÚÂß¼ÒÆλ¡¢ËãÊõÒÆλ¿É²Î¼û ѸÀ×Éî´ó±ÊÊÔÌⲿ·Ö¡£µÄÒ»µÀÌâ¡£
ÒÔÇ°¿´µ½C++±ê×¼ÉÏ˵£¬ÒÆλÔËËã·û£¨<<¡¢>>£©³ö½çʱµÄÐÐΪ²¢²»È·¶¨£º
The behavior is undefined if the right operand is negative, or greater than or equal to the length in bit ......
http://www.vckbase.com/document/viewdoc/?id=1711
×÷ÕߣºÇóÊdzà×Ó
Ò»¡¢ÏµÍ³»·¾³
Linux ²Ù×÷ϵͳ kernel2.4.2£¬°²×° gsoap2.6 µ½Ä¿Â¼/usr/local/gsoap
¶þ¡¢gSOAP µÄ¼òҪʹÓÃÀý×Ó
¡¡¡¡ÏÂÃæÊÇÒ»¸ö¼òµ¥µÄÀý×Ó£¬ÊµÏÖÒ»¸ö¼Ó·¨ÔËËãµÄ WebService£¬¾ßÌ幦ÄÜÊÇ¿Í»§¶Ë£¨client£©ÊäÈë num1 ºÍ num2£¬·þÎñÆ÷¶Ë£¨server£©·µ»Ø num ......
¡¾ÔÐÍ¡¿
printf("<¸ñʽ»¯×Ö·û´®>
", <²ÎÁ¿±í>
);
int printf
(const char *format, ...);
int fprintf
(FILE *stream, const char *format, ...);
int sprintf
(char *str, const char *format, ...);
int snprintf
(char *str, size_t size, const char *format, ...);
vp ......
ÕâƪÈÕÖ¾»¹ÊÇÏÈ´ÓÒ»¸öÄܹ»ÔËÐÐÆðÀ´µÄÀý×Ó³ö·¢£¬Ò»µ©ÄÜ˳ÀûµÄ¿´µ½³ÌÐòµÄ³É¹¦ÔËÐУ¬ÄÇô½ÓÏÂÀ´µÄʼþÎÒÏëÓ¦¸ÃÊÇÎÊΪʲôÁË£¿ËƺõÕâÑù¸ü¼ÓÈÝÒ×Àí½âºÍÕÆÎÕ¡£
¶ÔÓÚsocket³ÌÐòµÄ¸ÅÄîÕâÀï¾Í²»¶àдÁË£¬µ«ÎÒÏàÐÅ£¬Èç¹ûÄÜ¿´ÍêÕâÕûƪÎÄÕ£¬ÎÒÏàÐŲ»»áÔÙÓÐÕâÑùµÄÒÉÎʵġ£
ÏÂÃ潫±àдһ¸öc/s½á¹¹µÄ³ÌÐò£¬Ö÷Òª¹¦ÄÜÊÇclient½«Ïòserver·¢Ë ......