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

C/C++ÖÐÖظ´¶¨ÒåµÄÎÊÌâ


ÓÃ#include¿ÉÒÔ°üº¬ÆäËûÍ·ÎļþÖбäÁ¿¡¢º¯ÊýµÄÉùÃ÷£¬ÎªÊ²Ã´»¹Òªextern¹Ø¼ü×Ö,Èç¹ûÎÒÏëÒýÓÃÒ»¸öÈ«¾Ö±äÁ¿»ò
º¯Êýa£¬ÎÒÖ»ÒªÖ±½ÓÔÚÔ´ÎļþÖаüº¬#include<xxx.h>
(xxx.h°üº¬ÁËaµÄÉùÃ÷)²»¾Í¿ÉÒÔÁËô£¬ÎªÊ²Ã´»¹ÒªÓÃexternÄØ£¿£¿Õâ¸öÎÊÌâÒ»Ö±Ò²ÊÇËÆÊǶø·ÇµÄÀ§ÈÅ×ÅÎÒÐí¶àÄêÁË£¬½ñÌìÉÏÍøºÝºÝ²éÁËÒ»ÏÂ×ÜËãСÓÐ
Ëù»ñÁË£º
Í·Îļþ
Ê×ÏÈ˵ÏÂÍ·Îļþ£¬ÆäʵͷÎļþ¶Ô¼ÆËã»ú¶øÑÔûʲô×÷Óã¬ËýÖ»ÊÇÔÚÔ¤±à
ÒëʱÔÚ#includeµÄµØ·½Õ¹¿ªÒ»Ï£¬Ã»±ðµÄÒâÒåÁË£¬ÆäʵͷÎļþÖ÷ÒªÊǸø±ðÈË¿´µÄ¡£
ÎÒ×ö¹ýÒ»¸öʵÑ飬½«Í·ÎļþµÄºó׺¸Ä³Éxxx.txt£¬È»ºóÔÚÒýÓøÃÍ·ÎļþµÄµØ·½ÓÃ
#include"xxx.txt"
±àÒ룬Á´½Ó¶¼ºÜ˳ÀûµÄ¹ýÈ¥ÁË£¬ÓÉ´Ë¿ÉÖª£¬Í·Îļþ½ö½öΪÔĶÁ´úÂë×÷Óã¬Ã»ÆäËûµÄ×÷ÓÃ
ÁË£¡
²»¹ÜÊÇC»¹ÊÇC++£¬Äã°ÑÄãµÄº¯Êý£¬±äÁ¿»òÕ߽ṹÌ壬ÀàɶµÄ·ÅÔÚÄãµÄ.c»òÕß.cppÎļþÀȻºó±àÒë³É
lib,dll,obj,.oµÈµÈ£¬È»ºó±ðÈËÓõÄʱºò ×î»ù±¾µÄgcc hisfile.cpp yourfile.o|obj|dll|lib µÈµÈ¡£
µ«
¶ÔÓÚÎÒÃdzÌÐòÔ±¶øÑÔ£¬ËûÃÇÔõô֪µÀÄãµÄlib,dll...ÀïÃæµ½µ×ÓÐʲô¶«Î÷£¿Òª¿´ÄãµÄÍ·Îļþ¡£ÄãµÄÍ·Îļþ¾ÍÊǶÔÓû§µÄ˵Ã÷¡£º¯Êý£¬²ÎÊý£¬¸÷ÖÖ¸÷ÑùµÄ½Ó
¿ÚµÄ˵Ã÷¡£
   
ÄǼÈÈ»ÊÇ˵Ã÷£¬ÄÇôͷÎļþÀïÃæ·ÅµÄ×Ô
È»¾ÍÊǹØÓÚº¯Êý£¬±äÁ¿£¬ÀàµÄ“ÉùÃ÷
”ÁË¡£¼Ç×Å£¬ÊÇ“ÉùÃ÷”£¬
²»ÊÇ“¶¨Ò唡£
ÄÇô£¬ÎÒ¼ÙÉè´ó¼ÒÖªµÀÉùÃ÷ºÍ¶¨ÒåµÄ
Çø±ð¡£ËùÒÔ£¬×îºÃ²»ÒªÉµÎûÎûµÄÔÚÍ·ÎļþÀﶨÒåʲô¶«Î÷¡£±ÈÈçÈ«¾Ö±äÁ¿£º
/*xxÍ·Îļþ*/
#ifndef _XX_Í·Îļþ.H
#define _XX_Í·Îļþ.H
int A;
#endif
ÄÇô£¬ºÜÔã¸âµÄÊÇ£¬ÕâÀïµÄint
AÊǸöÈ«¾Ö±äÁ¿µÄ¶¨Ò壬ËùÒÔÈç¹ûÕâ¸öÍ·Îļþ±»¶à´ÎÒýÓõĻ°£¬ÄãµÄA»á±»Öظ´¶¨Òå
ÏÔÈ»Óï·¨ÉÏ´íÁË¡£Ö»²»¹ýÓÐÁËÕâ¸ö#ifndefµÄÌõ¼þ±àÒ룬ËùÒÔÄܱ£Ö¤ÄãµÄÍ·ÎļþÖ»±»ÒýÓÃÒ»
´Î£¬²»¹ýÒ²Ðí»¹ÊÇ»á²í×Ó£¬µ«Èô¶à¸öcÎļþ°üº¬Õâ¸öÍ·Îļþʱ»¹ÊÇ»á³ö´íµÄ£¬ÒòΪºêÃûÓÐЧ·¶Î§½öÏÞÓÚ±¾cÔ´Îļþ£¬ËùÒÔÔÚÕâ¶à¸öcÎļþ±àÒëʱÊDz»»á³ö´íµÄ£¬µ«ÔÚ
Á´½Óʱ¾Í»á±¨´í£¬ËµÄã¶à´¦¶¨ÒåÁËͬһ¸ö±äÁ¿£¬
Linking...
incl2.obj : error
LNK2005: "int glb" (?glb@@3HA
) already
defined in incl1.obj
Debug/incl.exe : fatal error LNK1169: one
or more multiply defined symbols found
×¢Ò⣡£¡£¡
extern
Õâ¸ö¹Ø¼ü×Ö
ÕæµÄ±È½Ï¿É¶ñ£¬ÔÚÉùÃ÷µÄʱºò£¬Õâ¸öextern¾ÓÈ»¿ÉÒÔ±»Ê¡ÂÔ£¬ËùÒÔ»áÈÃÄã¸ã²»Çå³þµ½µ×ÊÇÉùÃ÷»¹ÊǶ¨Ò壬ÏÂÃæ·Ö±äÁ¿ºÍ


Ïà¹ØÎĵµ£º

linux 2.6.24ÔÚS3C2410ÉϵÄÒÆÖ²(1)(»ùÓÚGEC2410)

1.ÏÂÔØlinux kernelÔ´´úÂë
µ½http://www.kernel.org/ÏÂÔØlinuxÄÚºËÔ´´úÂë,ÕâÀïÎÒÃÇʹÓÃ2.6.24.4µÄÄÚºË.
½âѹlinux-2.6.24.4.tar.bz2
[matt@localhost GEC2410]$ tar -xvjf linux-2.6.24.4.tar.bz2
[matt@localhost GEC2410]$ cd linux-2.6.24.4
2.ÐÞ¸ÄMakefile,ÉèÖý»²æ±àÒëÆ÷
ARCH  ?= arm
CROSS_COMPILE ......

C/C++¿ª·¢¾­ÑéÈ˲ÅÇë½ø£¡

ÉÏÖÜÀÏ°å·ÖÏÂÀ´6¸öְλÈí¼þ¿ª·¢·½ÃæµÄְλ¸øÎÒ£¬ÒªÎÒ°´Ö°Î»ÒªÇóÑ°ÕÒºÏÊʵÄÈ˲š£¾ÓÈ»ÊÇC/C++!¾ÝÎÒËùÖª£¬ÔÚÈ˲ſâÖУ¬JAVA È˲ŵ¹ÊÇÓ¦Óо¡ÓУ¬Ñ§CµÄ£¬»¹ÊÇǶÈëʽ¿ª·¢µÄ¿ÉÕæµÄºÃÉÙ°¡¡£ÎÒÓÖ²»ÊÇŮ洣¬ÄѵÀÎÒ»áÔìÈ˲Åô£¿ÒªÇóÌõ¼þ»¹Õâô¸ß£¡
ÒÔÏÂÊÇ´óÁ¬Èí¼þÔ°¼¸¼ÒÖªÃûÍâÆóίÍÐÎÒÃÇÕÐƸµÄְλÐÅÏ¢¡£
Position 1 Èí¼þ¿ª·¢¹¤³Ìʦ ......

¡¶the c programming language¡·»Ø¹ËÖ®Ò»

1,³ÌÐò¿ØÖÆÖеĿØÖÆÁ÷Óï¾äÓÃÓÚ¿ØÖƸ÷¼ÆËã»ú²Ù×÷Ö´ÐеĴÎÐò¡£
 Ê²Ã´ÊÇ¿ØÖÆÁ÷Óï¾äÏëÁË°ëÌ죬ԭÀ´²»¹ýÊÇÕâЩ£¬if-elseÓï¾ä£¬else-ifÓï¾ä£¬switchÓï¾ä£¬whileÑ­»·£¬forÑ­»·£¬do-whileÑ­»·µÈ¡£
2,»¨À¨ºÅ{}£¬ÆäÖеÄÓÒ»¨À¨ºÅÓÃÓÚ½áÊø³ÌÐò¿é£¬Æäºó²»ÐèÒª·ÖºÅ¡£
  µ±³õÒ»¿´µ½“Æäºó²»ÐèÒª·ÖºÅµÄ”ʱºòÏëÁË°ëÌ ......

"extern C", ÄãÕæµÄ¶®ÁËÂð£¿

       ÔÚc++ primeÊéÖп´µ½¹ý£¬ÔÚDLLºÍlibÖп´µ½¹ý£¬µ«ÊÇÿ´Î¿´¹ý¾Í²»ÇóÉõ½âµØһɨ¶ø¹ý¡£ÐÄÀïÖªµÀÓÐextern cÕâ¸öÓï¾ä£¬È´²»ÖªµÀ¸ÃÓÃÔÚÄÄÀÓÖÄÜÆðµ½Ê²Ã´×÷Óᣰ¦£¬ÏëÏë×Ô¼ºÒ²ËãÊÇд¹ý²»ÉÙCODEµÄÈËÁË£¬¿ÉÕâÖÖÑÛ¸ßÊֵ͵Ä벡ȴ´Óû¸Ä±ä¹ý¡£½ñÌìͻȻÏëÆðexternÕâ¸ö¹Ø¼ü×Ö£¬Ëì¾ö¶¨²»ÄÜÔÙÕâôÀË ......

ÈçºÎʹÓÃObjective C½âÎöHTMLºÍXML

ʹÓÃObjective-C½âÎöHTML»òÕßXML£¬ÏµÍ³×Ô´øÓÐÁ½ÖÖ·½Ê½Ò»¸öÊÇͨ¹ýlibxml£¬Ò»¸öÊÇͨ¹ýNSXMLParser¡£²»¹ýÕâÁ½ÖÖ·½Ê½¶¼ÐèÒª×Ô¼ºÐ´ºÜ¶à±àÂëÀ´´¦ÀíץȡÏÂÀ´µÄÄÚÈÝ£¬¶øÇÒ²»ÊǺÜÖ±¹Û¡£
ÓÐÒ»¸ö±È½ÏºÃµÄÀà¿âhpple£¬ËüÊÇÒ»¸öÇáÁ¿¼¶µÄ°ü×°¿ò¼Ü£¬¿ÉÒԺܺõĽâ¾öÕâ¸öÎÊÌâ¡£ËüÊÇÓÃXPathÀ´¶¨Î»ºÍ½âÎöHTML»òÕßXML¡£
°²×°²½Ö裺
-¼ÓÈë libx ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ