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

³£ÓõÄC/C++¹¤³ÌMakefileÄ£°å

תÌû£ºÒ»»ÔµÄÎÄÕÂ
ÔÚLinuxÏÂ×ö¿ª·¢ÄÑÃâÒª½Ó´¥makefile£¬Õû¸öÏîÄ¿µÄ¹¹½¨¶¼ÒÀÀµÓÚËü¡£100¸ödeveloperÓÐ100ÖÖmakefileµÄд·¨£¬ÔÚÒ»¸ö½Ï´óµÄÏîÄ¿ÖУ¬¸÷ÖÖ¸÷ÑùµÄmakefileÎÞÂÛÔÚ¿ª·¢¡¢ºóÆÚά»¤»¹ÊÇÕû¸öϵͳµÄ³ÖÐø¼¯³É¶¼ÊÇÒ»¸ö¸ºµ£¡£
ÓÐÐÒ²ÎÓëÖع¹Ò»¸öÒÅÁôϵͳµÄmakefile£¬ÒÔÏÂÊÇһЩÐĵúÍÒ»¸ömakefileÄ£°å¡£
Öع¹Ä¿µÄ£º
1.ÇåÎúÒ׶®¡¢ÈÝÒ×ά»¤
2.·½±ãϵͳµÄ³ÖÐø¼¯³É
Öع¹Ô­Ôò£º
1.×ÓÄ£¿émakefileÄ£°å»¯
2.ÍⲿÒÀÀµ¡¢Í¨Óú궨Ò弯Öл¯
3.ÖмäºÍ×îÖÕÊä³ö¼¯ÖУ¬±ãÓÚϵͳ¹¹½¨
ÏÂÃæÊÇ×ܽá³öµÄÒ»¸ömakefileÄ£°å£¬ÎÒÔÚÈÕ³£µÄ¿ª·¢Öж¼ÓÃËü£¬ÆäÖмÓÈëÁËÏêϸµÄ×¢ÊÍ¡£
view plaincopy to clipboardprint?
#Get the ROOT_PATH which common files located, assuming this makefile located in $(ROOT_PATH)/src/sub_module
ROOT_PATH = $(shell cd ../..; pwd)
#Where define the path of third party modules
include $(ROOT_PATH)/path
#Where define common macros such as CC=gcc, CXX=g++ and so on
include $(ROOT_PATH)/common
#Set target output path and the path of intermidiate object
#The path macros should include in $(ROOT_PATH)/path
OUT_PATH = $(OUTPUT_PATH)/submodule
OBJ_PATH = $(TMPOBJ_PATH)/submodule
TARGET = $(OUT_PATH)/targe
#If the targe is share object then set corresponding flags
#which should define in $(ROOT_PATH)/common
CFLAGS += $(CFLAGS_SO)
LDFLAGS += $(LDFLAGS_SO)
#Custom Predefines
CFLAGS += -DXXXXXXXX
CFLAGS += -DYYYYYYYY
#Dependent header files
#The path macros should include in $(ROOT_PATH)/path
CFLAGS += -I. \
-I$(XXXX_INC) \
-I$(YYYY_INC) \
-I$(ZZZZ_INC)
#Dependent libraries
#The path macros should include in $(ROOT_PATH)/path
LDFLAGS += -L$(XXXX_LIB) -lxxxx \
-L$(YYYY_LIB) -lyyyy
#Set CPP source directory
CPP_SRCDIR = .
#Or set specific CPP Source files
ADDITIONAL_CPP_SOURCES = \
$(PATH_A)/a.cpp \
$(PATH_B)/b.cpp
#Traverse every directory in $(CPP_SRCDIR), and find every cpp file
CPP_SOURCES = $(foreach d,$(CPP_SRCDIR),$(wildcard $(d)/*.cpp) ) $(ADDITIONAL_CPP_SOURCES)
#Traverse every cpp file in $(CPP_SOURCES) and get corresponding object file(.


Ïà¹ØÎĵµ£º

JavaºÍC++λÔËËã¶Ô±È

ΪÁËʵÏÖÁ½¸öÊý×Ö½øÐн»»»£¬ÎÒÃÇͨ³£¿ÉÒÔÀûÓÃλÔËËãÀ´ÊµÏÖ
C++³ÌÐò     swap(int a  ,int b){a^=b^=a^=b;}
JAVA³ÌÐò    swap(int a, int b){  a^=b;b^=a;a^=b; }»òÕß{ b^=(a^=b) ; a^=b;}
Èç¹ûJAVAÓÃC++µÄʵÏÖ·½Ê½Ôò»áµÃµ½ bµÃµ½ÁËaµÄÖµ£¬µ«ÊÇaÏÖÔÚµÄֵȴ² ......

mysql connect by c++

#include <stdio.h>
#include <windows.h>
#include <mysql.h>
#define host "localhost"
#define username "root"
#define password "123"
#define database "oa"
MYSQL *conn;
int main()
{
MYSQL_RES *res_set;
MYSQL_ROW row;
unsigned int i,ret;
FILE *fp;
MYSQL_FIELD *field; ......

SQLite C/C++½Ó¿Ú½éÉÜ

ÕâƪÎÄÕÂÊÇʹÓÃSQLite C/C++½Ó¿ÚµÄÒ»¸ö¸ÅÒª½éÉܺÍÈëÃÅÖ¸ÄÏ¡£
ÓÉÓÚÔçÆÚµÄSQLiteÖ»Ö§³Ö5¸öC/C++½Ó¿Ú£¬Òò¶ø·Ç³£ÈÝÒ×ѧϰºÍʹÓ㬵«ÊÇËæ×ÅSQLite¹¦ÄܵÄÔöÇ¿£¬ÐµÄC/C++½Ó¿Ú²»¶ÏµÄÔö¼Ó½øÀ´£¬µ½ÏÖÔÚÓг¬¹ý150¸ö²»Í¬µÄAPI½Ó¿Ú¡£ÕâÍùÍùʹ³õѧÕßÍû¶øÈ´²½¡£ÐÒÔ˵ÄÊÇ£¬´ó¶àÊýSQLiteÖеÄC/C++½Ó¿ÚÊÇרÓõģ¬Òò¶øºÜÉÙ±»Ê¹Óõ½¡£¾¡¹ÜÓÐÕâ ......

Delphi Óë C/C++ Êý¾ÝÀàÐͶÔÕÕ±í

Delphi Óë C/C++ Êý¾ÝÀàÐͶÔÕÕ±í
DelphiÊý¾ÝÀàÐÍC/C++
ShorInt
8λÓзûºÅÕûÊý
char
Byte
8λÎÞ·ûºÅÕûÊý
BYTE,unsigned short
SmallInt
16λÓзûºÅÕûÊý
short
Word
16λÎÞ·ûºÅÕûÊý
unsigned short
Integer,LongInt
32λÓзûºÅÕûÊý
int,long
Cardinal,LongWord/DWORD
32λÎÞ·ûºÅÕûÊý
unsigned long
Int6 ......

¾­µäC/C++ÃæÊÔÌâ

1.½éÉÜÒ»ÏÂSTL£¬Ïêϸ˵Ã÷STLÈçºÎʵÏÖvector¡£
Answer:
     STL (±ê׼ģ°æ¿â£¬Standard Template Library)ËüÓÉÈÝÆ÷Ëã·¨µü´úÆ÷×é³É¡£
     STLÓÐÒÔϵÄһЩÓŵ㣺
     ¿ÉÒÔ·½±ãÈÝÒ×µØʵÏÖËÑË÷Êý¾Ý»ò¶ÔÊý¾ÝÅÅÐòµÈһϵÁеÄËã·¨£»
 &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ