rubyºÍMinGWµÄÒ»´ÎÈÚºÏ - C/C++ / C++ ÓïÑÔ
Ï£Íû¸ø´ó¼ÒÌṩһЩеÄ˼·.
ÎÒÃÇÔÚʹÓÃC±à³Ìʱ»áÓöµ½Ò»¸öÎÊÌ⣬±ÈÈçÍ·ÎļþµÄÒ»¸öº¯Êý°üº¬ÔÚÒ»¸ölib ÖУ¬µ«ÊÇ
ÔÚʵ¼ÊÁ¬½ÓÖÐÎÒÃDz»ÖªµÀËüÔÚÄĸö¿âÖС£Ò²Ðí¿ÉÐеÄÒ»ÖÖ°ì·¨ÊÇÖ±½ÓÉÏÍø²éѯij¸ö
º¯ÊýµÄÒÀÀµÌõ¼þ£¬Õâ¶ÔÓÚ³£Óú¯ÊýÊÇûÎÊÌâµÄ£¡µ«ÊǶÔÓÚ¸´ÔÓ¶øÓÖȱÉÙÎĵµµÄµÚÈý·½
libÀ´Ëµ£¬ÎÞÒìÓÚ´óº£ÀÌÕë¡£
×Ô´Ëͨ¹ý2ÖÖ°ì·¨À´³¢ÊÔ½â¾öÕâ¸öÎÊÌ⣬ÎÒÃÇÏÈ¿´µÚÒ»ÖÖ£º
ÔÚWindowsÏÂʹÓÃÅú´¦ÀíÓïÑÔÀ´²éÕÒÖ¸¶¨µÄº¯Êý·ûºÅ:
crt.bat:
@echo off
set gccpath=d:\downloadsvr\mingwstudio\mingw
dir %gccpath%\lib /b>files.txt
if not exist files md files
for /f %%i in (files.txt) DO (
set fprefix=%%i
%gccpath%\bin\nm.exe -s -D %gccpath%\lib\%%i>files\%%i.txt
for %%a in (files\%%i.txt) do (
if %%~za equ 0 del %%a
)
)
del files.txt
@echo ######## Create Names Database Successed!!! #########
pause
;#################################################################
fnd.bat:
@echo off
dir files\ /b >tmp.txt
for /f %%i in (tmp.txt) DO (
find /i /n "%1" files\%%i
)
del tmp.txt
ÒÔÉÏÓÐ2¸öbatÎļþ£¬crt.batÊÇÉú³É¶ÔÓ¦libÎļþ¼ÐÖеÄËùÓÐlibµÄ·ûºÅ£¬·Ö±ð·ÅÔÚÈô¸É¸öÎı¾
ÎļþÖС£Ö»Òªlib²»·¢Éú±ä¶¯£¬ÄÇôֻҪÉú³ÉÒ»´Î¼´¿É£¡È»ºóʹÓÃfnd.batÀ´²éѯij¸ö·ûºÅ¡£
that's all£¡£¡£¡
ÄÇôʹÓÃrub
Ïà¹ØÎÊ´ð£º
±¾ÈËÕýÔÚÓÃJava×öÒ»¸öC/S¼Ü¹¹µÄÏîÄ¿£¬
¿ÉÊÇÓÉÓÚÏîÄ¿±È½Ï´ó£¬Ç°ÆڶԼܹ¹µÄÉè¼ÆÓÈÆäÖØÒª£¬ÒòΪºóÆÚ¿ÉÄÜËæʱ»á¼Ó¸ö¹¦ÄÜ»òÕßÈ¥µôijЩ¹¦ÄÜ¡£
ËùÒÔÌصØÑ°ÇóÈçºÎÉè¼ÆC/SµÄ¼Ü¹¹Ê¹³ÌÐò¸ü¼ÓÃæÏò¶ÔÏó¸ü¼ÓÒ×ÓÚά ......
ÔÚ¸ùĿ¼/libÖдæ·ÅÒ»¸ölog.c£¬log.h£¬²¢ÓÃÏÂÃæµÄÓï¾ä£º
gcc -c log.c
ar crv liblog.a log.o
±àÒë³öÒ»¸öliblog.a¾²Ì¬¿â£¬È»ºóÔÚÎļþ¼Ð£º/testfileÖд´½¨Ò»¸ötest.cºÍtestc.c£¬test.cÖÐÒýÓÃÁËtestc.cÖж¨ÒåµÄ·½·¨ ......
¹«Ë¾¿ª·¢Ò»¸ö´¥ÃþÆÁ³ÌÐò£¬ÎÒ¸ºÔðµÄÒ»¿é£¬ÊµÏÖÕâÑùÒ»¸ö¹¦ÄÜ£¬µ±Êó±êµã»÷´°¿ÚÖÐͼƬ£¨Ò»ÕÅͼ·Ö³É¼¸²¿·Ö£©µÄÆäÖÐÒ»²¿·Öʱ£¬½«Õⲿ·ÖͼƬ½ØÈ¡³öÀ´£¬µ¯³öеĴ°¿Ú£¬½«½ØÈ¡³öµÄͼƬÏÔʾ³öÀ´¡£ÎÒʹÓÃRectangeÀà¿ØÖÆÁË·µ»Ø£¬ ......
ÔھƵê¹ÜÀíϵͳÖÐ,ÓÐÒ»¸ö¶ÔÄÚµÄϵͳ,¹©Ç°Ì¨·þÎñÔ±ºÍ¾ÀíʹÓÃ
»¹ÓÐÒ»¸ö¾ÍÊǶÔÍâ,Èÿͻ§¿ÉÒÔÔÚÍøÉÏÔ¤¶©·¿¼ä,
ËüÃÇÖ®¼äÊÇÔõôͨѶµÄ.?µ±ÎÒÌá½»Ô¤¶©·¿¼äÐÅÏ¢µÄʱºò,
ÔÚ¶ÔÄÚµÄϵͳÖÐ,ÈçºÎÖªµÀÎÒÒѾÌá½»ÁËÐÅÏ¢¹ýÈ¥.Ê¹Ç ......