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

qt4ÖÐÈçºÎµ÷ÓÃCº¯Êý£¨linuxÏ£©

qtĬÈϵıà³ÌÓïÑÔΪC++ÓïÑÔ¡£Èç¹ûÄãÓÃqt±àÒë.cÎļþ£¬»á³öÏÖÕÒ²»µ½CÓïÑÔµÄĬÈÏÍ·ÎļþµÈ´íÎó£¨È磺stdio.hµÈ£©¡£qtÖв»Ö§³Ö
extern "C"{}µÄÕâÖÖд·¨£¬ÎÒÇ°¼¸ÌìÓÐÒ»¸öC³ÌÐòÐèÒªÒÆÖ²µ½QtµÄ¹¤³ÌÖУ¬±¾Ï£ÍûÖ±½Óextern "C"¾ÍokÁË£¬µ«·¢ÏÖqt4¾ÓÈ»²»Ö§³ÖÕâÖÖд·¨¡£ÎҵijÌÐòÖÐÓõ½Á˺ü¸¸ölinuxϵͳͷÎļþ£¬ÊÇÏò´®¿Ú·¢Ö¸ÁîÖ®ÀàµÄ³ÌÐò£¬³ÌÐòÖÐÓõ½ÁË»¥³âËø²¢´´½¨ÁËÒ»¸öÏ̡߳£Èç¹ûÔÙÓÃqtÓïÑÔÀ´Ð´Ò»±éµÄ»°ÎÒ»á¹ÒµôµÄ£¬ËùÒÔûÓа취£¬ÔÚÍøÉÏÕÒÁË°ëÌ죬ÖÕÓÚÕÒµ½½â¾ö·½·¨¡£
½«.cÎļþ±àÒëΪº¯Êý¿âµÄ·½Ê½ÔÚqtϵ÷Óã¬ÕâÖÖ·½·¨Ã²ËÆÐеÃͨ£¬ÎҾͿªÊ¼Ðж¯ÁË¡£
ÏÂÃæµÄÄÚÈݽ²µÃ±È½Ï¶à£¬±È½ÏÈ«£¬±È½ÏÊʺϳõѧÕߣ¬ÊÇÎÒÔÚÍøÉÏdownµÄ£¬¸ø³öÁËÔ­ÍøÕ¾µÄÁ´½Ó£¬×îºó¸ø³öÁËÒ»¸ö³ÌÐò¡£¾­¹ý×Ô¼ºÕûÀíºÃ¹éÄÉÈçÏ£º
ÐèҪ˵Ã÷µÄÊÇ£ºÊ¹ÓÃgcc¿ÉÒÔ½«³ÌÐò±àÒë³É¶¯Ì¬¿â»òÕß¾²Ì¬¿âµÄÐÎʽ£¬ËüÃÇÔÚ³ÌÐòÖеĵ÷Óõķ½Ê½Ò²²»¾¡Ïàͬ£¬¸ø³öµÄ³ÌÐòÖе÷ÓõÄÊǶ¯Ì¬Á¬½Ó¿â¡£±àÒë³É¶¯Ì¬µÄ»¹ÊǾ²Ì¬µÄ¸ù¾Ý×Ô¼ºµÄÐèÒª½øÐС£Èç¹ûÔ­C³ÌÐò±àÒëµÄʱºòÐèÒªgccµÄ¶îÍâÑ¡Ïî(Èç gcc -lpthread -o hello hello.c)µÈ£¬½¨Òé²ÉÓö¯Ì¬µÄÐÎʽ¡£
1.ʲôÊǾ²Ì¬Á¬½Ó¿â£¬Ê²Ã´ÊǶ¯Ì¬Á´½Ó¿â
         ¾²Ì¬Á´½Ó¿âÓ붯̬Á´½Ó¿â¶¼Êǹ²Ïí´úÂëµÄ·½Ê½£¬Èç¹û²ÉÓþ²Ì¬Á´½Ó¿â£¬ÔòÎÞÂÛÄãÔ¸²»Ô¸Ò⣬lib ÖеÄÖ¸Áȫ²¿±»Ö±½Ó°üº¬ÔÚ×îÖÕÉú³ÉµÄ EXE ÎļþÖÐÁË¡£µ«ÊÇÈôʹÓàDLL£¬¸Ã DLL ²»±Ø±»°üº¬ÔÚ×îÖÕ EXE ÎļþÖУ¬EXE ÎļþÖ´ÐÐʱ¿ÉÒÔ“¶¯Ì¬”µØÒýÓúÍжÔØÕâ¸öÓë EXE ¶ÀÁ¢µÄ DLL Îļþ¡£¾²Ì¬Á´½Ó¿âºÍ¶¯Ì¬Á´½Ó¿âµÄÁíÍâÒ»¸öÇø±ðÔÚÓÚ¾²Ì¬Á´½Ó¿âÖв»ÄÜÔÙ°üº¬ÆäËûµÄ¶¯Ì¬Á´½Ó¿â»òÕß¾²Ì¬¿â£¬¶øÔÚ¶¯Ì¬Á´½Ó¿âÖл¹¿ÉÒÔÔÙ°üº¬ÆäËûµÄ¶¯Ì¬»ò¾²Ì¬Á´½Ó¿â¡£ÔÚwindowsºÍlinuxÉ϶¼ÊÇÏàͬµÄ£¬Ö»²»¹ýÎļþµÄ¸ñʽ²»Í¬¶øÒÑ¡£
http://www.cnblogs.com/winston/archive/2008/07/05/1236273.html
2.gccÉú³É¾²Ì¬¿âºÍ¶¯Ì¬¿â
µÚ1²½£º±à¼­µÃµ½¾ÙÀýµÄ³ÌÐò--hello.h¡¢hello.cºÍmain.c£»
µÚ2²½£º½«hello.c±àÒë³É.oÎļþ£»
ÎÞÂÛ¾²Ì¬¿â£¬»¹ÊǶ¯Ì¬¿â£¬¶¼ÊÇÓÉ.oÎļþ´´½¨µÄ¡£Òò´Ë£¬ÎÒÃDZØÐ뽫Դ³ÌÐòhello.cͨ¹ýgccÏȱàÒë³É.oÎļþ¡£
ÔÚϵͳÌáʾ·ûϼüÈëÒÔÏÂÃüÁîµÃµ½hello.oÎļþ¡£
# gcc -c hello.c
µÚ3²½£ºÓÉ.oÎļþ´´½¨¾²Ì¬¿â£»
¾²Ì¬¿âÎļþÃûµÄÃüÃû¹æ·¶ÊÇÒÔlibΪǰ׺£¬½ô½Óןú¾²Ì¬¿âÃû£¬À©Õ¹ÃûΪ.a¡£ÀýÈ磺ÎÒÃǽ«´´½¨µÄ¾²Ì¬¿âÃûΪmy


Ïà¹ØÎĵµ£º

¼òµ¥FTP·þÎñÆ÷µÄ´î½¨£¨linux ¡¢windows£©

linux      ÊÂÇéÒª´ÓSSH˵Æð£¬×ʼÎÒÃÇÔ¶³Ì·ÃÎÊlinux·þÎñÆ÷£¬¶¼ÊÇÓõÄSSH£¬Õâ¸ö¶«Î÷ºÜ·½±ãÁË£¬ÌṩÁËÃüÁîÐУ¬»¹Óд°¿Ú½çÃ棬ÓÃÆðÀ´·½±ã£¬ÏàÐÅÓùýµÄÈ˶¼ÓÐÌå»á£¬µ«Êǵ±ÎÒ»»³ÉflashFXPÁ¬½ÓͬÑùµÄlinux·þÎñÆ÷ʱÔõô¶¼Á¬²»ÉÏ£¬ÕâÏÂÓôÃÆ»µÁË£¬Ôõô°ìÄØ£¿     ÔÚ¾­ÀúÁËÎÞÊý´ÎµÄ³¢ÊÔÖ®ºó£ ......

LinuxÖ®VIÃüÁîÏê½â

viÊÇËùÓÐUNIXϵͳ¶¼»áÌṩµÄÆÁÄ»±à¼­Æ÷£¬ËüÌṩÁËÒ»¸öÊÓ´°É豸£¬Í¨¹ýËü¿ÉÒԱ༭Îļþ¡£µ±È»£¬¶ÔUNIXϵͳÂÔÓÐËùÖªµÄÈË£¬
»ò¶à»òÉÙ¶¼¾õµÃvi³¬¼¶ÄÑÓ㬵«viÊÇ×î»ù±¾µÄ±à¼­Æ÷£¬ËùÒÔÏ£Íû¶ÁÕßÄܺúðÑËüѧÆðÀ´£¬ÒÔºóÔÚUNIXÊÀ½çÀï±Ø½«³©ÐÐÎÞ×è¡¢
ÓÎÈÐÓÐÓ࣬ÒòΪÆäËû¼¸ÖÖÎı¾´¦ÀíÆ÷²¢·ÇUNIX±ê×¼Å䱸¡£Ëµ²»¶¨±ðÈ˵ÄLinux»úÆ÷û°²×°j ......

SQLiteÓëC½áºÏ

SQLite¹Ù·½ÍøÕ¾Àý×Ó£º
#include <stdio.h>
#include <sqlite3.h>
static int callback(void *NotUsed, int argc, char **argv, char **azColName){
int i;
for(i=0; i<argc; i++){
printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
}
printf("\n");
return 0;
}
i ......

linux CÕýÔò±í´ïʽ

ÔÚÍøÉÏÕÒµ½µÄÒ»¸ö³ÌÐò
[c]
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>
/* È¡×Ó´®µÄº¯Êý */
static char* substr(const char*str,unsigned start, unsigned end)
{
      unsigned n = end - start;
      static char stbuf[256]; ......

Linux/WinCE C¡¢C++¸ß¶Ë¿Î³Ì

—¡ï—ÅàѵÖÜÆÚ£º¹²950ѧʱ  5¸öÔÂ
—¡ï—Åàѵ¸½Ôù£º±£Ö¤Ñ§Ô±ÈËÊÖÒ»»úºÍÒ»Ì×ARM9¿ª·¢°å
—¡ï—ÅàѵÄÚÈÝ£ºÔÚÏîÄ¿¾­ÀíµÄ´øÁìÏ£¬Í¨¹ýÍê³É¾ÖÍøµÄÂ齫ÓÎÏ·¡¢My ICQ(ÍøÂçÁÄÌì)ºÍ·¢µç»úÔÚÏß¼à¿Øϵͳ£¬BTÏÂÔØÈí¼þ£¬ÕÆÎÕ»ùÓÚLinuxºÍWindowsƽ̨ϵÄC/C++ÆóÒµ¼¶Ó¦ÓõĿª·¢¼¼ÄÜ£¬ÕÆÎÕ´óÐÍÈí¼þÏî ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ