¹ØÓÚ tiny c ¶Î´íÎóµÄÎÊÌâ - C/C++ / CÓïÑÔ
СµÜ×î½üÔÚÁ˽â¹ØÓÚtiny c µÄÎÊÌâ¡£ÔÚlinuxÏÂ×¼±¸°²×°¡£µ«°²×°Íê³ÉºóÅöµ½ÁËһЩÎÊÌ⡣ϣÍû´ó¼ÒÄܹ»°ïæ½â¾ö¡£ÒÔÏÂÊÇ°²×°Íê³ÉºóµÄÖ´Ðв½Öè¡£
[student@localhost ~]$ tcc -v
tcc version 0.9.25
[student@localhost ~]$ cd hp
[student@localhost hp]$ cd tcc-0.9.25
[student@localhost tcc-0.9.25]$ cd examples
[student@localhost examples]$ tcc -run ex1.c
¶Î´íÎó
[student@localhost examples]$ tcc -run ex5.c
¶Î´íÎó
ex1.c ´úÂë
#! /usr/local/bin/tcc -run
#include <tcclib.h>
int main()
{
printf("Hello World\n");
return 0;
}
ex5.c ´úÂë
#include <stdlib.h>
#include <stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
°²×°²½Öè
./configure
make
make install(ÒòΪ²»ÊÇÓÃrootµÇ¼µÄ£¬È¨ÏÞ²»¹»)
su(123456 Çл»root ȨÏÞ)
make install
Ò»ÇÐ˳Àû¡£
ÒÔÉÏÊÇ°²×°ºÍÖ´Ðйý³Ì¡£°æ±¾ÊÇlinux 2.6.29.4-167.fcll.i686.pae
ÓÃͬÑùµÄ°ì·¨³¢ÊÔ¹ýºÜ¶àlinuxϵͳ£¬ÓеĿÉÒÔ˳Àû°²×°£¬ÓеIJ»¿ÉÒÔ¡£
Çë´ó¼Ò°ïæ½â¾ö¡£
´úÂëÊÇûÓÐÎÊÌâµÄ¡£
´úÂëûÎÊÌ⣬Ӧ¸ÃÊÇ°²×°»ò±àÒëµÄÎÊÌ⣬tccûÓùý
Ïà¹ØÎÊ´ð£º
ÔÚ¸ùĿ¼/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Öж¨ÒåµÄ·½·¨ ......
ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À²®ÎĵÄ×Ö¿âÄãÓÐô£¿
ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......
ÔھƵê¹ÜÀíϵͳÖÐ,ÓÐÒ»¸ö¶ÔÄÚµÄϵͳ,¹©Ç°Ì¨·þÎñÔ±ºÍ¾ÀíʹÓÃ
»¹ÓÐÒ»¸ö¾ÍÊǶÔÍâ,Èÿͻ§¿ÉÒÔÔÚÍøÉÏÔ¤¶©·¿¼ä,
ËüÃÇÖ®¼äÊÇÔõôͨѶµÄ.?µ±ÎÒÌá½»Ô¤¶©·¿¼äÐÅÏ¢µÄʱºò,
ÔÚ¶ÔÄÚµÄϵͳÖÐ,ÈçºÎÖªµÀÎÒÒѾÌá½»ÁËÐÅÏ¢¹ýÈ¥.Ê¹Ç ......
ÎÒ¸Õ°ÑÌ·ºÆÇ¿µÄµÚÈý°æµÄÊéѧÍ꣬ÎÒÖªµÀµÄÓÐC++£¬CºÍÖ¸Õë CȱÏݺÍÏÝÚå Cר¼Ò±ä³É£¬»¹ÓÐÊý¾Ý½á¹¹£¬ÎÒÏëÎÊÎÊÎÒÓ¦¸ÃÒÔʲô˳ÐòÀ´Ñ§ÄØ
CȱÏݺÍÏÝÚå Cר¼Ò±à³Ì
Êǽø½×µÄ£¬²»Óü±×Å¿´
ÖÁÓÚ
CºÍÖ¸Õë
Äã²»Àí½âÖ ......