Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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(.


Ïà¹ØÎĵµ£º

PHPÀ©Õ¹C++


Õâ¸öÎĵµ¼òµ¥½éÉÜÁËÔõôʹÓÃC++ΪPHP±àдһ¸öÀ©Õ¹Ä£¿é¡£ÎÒÒѾ­±»Îʼ°Õâ¸öÎÊÌâÎÞÊý´ÎÁË£¬ËùÒÔÎÒ¾ö¶¨ÎªºóÀ´Õßдһ¸ö¼òµ¥µÄHOWTO¡£ÕâÆªÎÄÕÂÖ»»á˵Ã÷һЩҪµãºÍ¹Ø¼üÖ®´¦£¬Èç¹ûÄãÏ£ÍûѧϰC++»òPHP£¬Çë²éÔÄÆäËüµÄÎĵµ¡£
˳±ã£¬ÔÚ±¾ÎÄÖÐÎÒÃÇÒ²»á¿´Ò»ÏÂÔÚPHP5ÖÐÔõô°ÑC++ÀàÓ°Éäµ½PHPÖС£ÎÄÕÂÖеÄÀý×Ó¿ÉÒÔÔÚPHP4ºÍPHP5µÄ»·¾³ÏÂÊ¹Ó ......

VB/C++/C#´®¿ÚͨѶԴ´úÂ롾¸½ÏêϸעÊÍ¡¿


VB
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
    MSComm1.CommPort = i1
    MSComm1.PortOpen = True
    MSComm1.InputMode = comInputModeBinary
    MSComm1.InBufferCount = 0
& ......

C++ÖÐʹÓÃsqlite

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include ".\sqlite3_lib\sqlite3.h"
 
static int _callback_exec(void * notused,int argc, char ** argv, char ** aszColName)
{
    int i;
    for ( i=0; i<argc; i++ )
   ......

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

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