首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

BCB的条件编译.该如何处理

2012-03-14 
BCB的条件编译...一种方法是在 Project-options-Directotr/condition页中定义但是这样的话就需要导出2个

BCB的条件编译...
一种方法是在 Project->options->Directotr/condition页中定义

但是这样的话就需要导出2个makfile文件...

有没有方法可以只导出一个mak文件,然后通过某种条件(编译参数)来实现上面的条件编译

比如...make -f xxx.mak -DORACLE

[解决办法]
具体怎么写我不会,给你贴个wxWidgets中用bcc编译的配置文件,makefile后面的编译参数都在里面
你也可以下个wxWidgets看看,在wxWidgets\build\msw\config.bcc中

# =========================================================================
# This configuration file was generated by
# Bakefile 0.2.5 (http://www.bakefile.org)
# Beware that all changes made to this file will be overwritten next
# time you run Bakefile!
# =========================================================================


# -------------------------------------
# These are configurable options:
# -------------------------------------

# C compiler 
!ifndef CC
CC = bcc32
!endif

# C++ compiler 
!ifndef CXX
CXX = bcc32
!endif

# Standard flags for CC 
!ifndef CFLAGS
CFLAGS = 
!endif

# Standard flags for C++ 
!ifndef CXXFLAGS
CXXFLAGS = 
!endif

# Standard preprocessor flags (common for CC and CXX) 
!ifndef CPPFLAGS
CPPFLAGS = -a8 -g0
!endif

# Standard linker flags 
!ifndef LDFLAGS
LDFLAGS = 
!endif

# The C preprocessor 
!ifndef CPP
CPP = cpp32 -Sr -oCON
!endif

# What type of library to build? [0,1]
!ifndef SHARED
SHARED = 0
!endif

# Build wxUniversal instead of native port? [0,1]
!ifndef WXUNIV
WXUNIV = 0
!endif

# Compile Unicode build of wxWidgets? [0,1]
!ifndef UNICODE
UNICODE = 0
!endif

# Use MSLU library when building Unicode version. [0,1]
!ifndef MSLU
MSLU = 0
!endif

# Type of compiled binaries [debug,release]
!ifndef BUILD
BUILD = debug
!endif

# Should debugging info be included in the executables? The default value
# "default" means that debug info will be included if BUILD=debug
# and not included if BUILD=release. [0,1,default]
!ifndef DEBUG_INFO
DEBUG_INFO = default
!endif

# Should __WXDEBUG__ be defined? The default value "default" means that it will
# be defined if BUILD=debug and not defined if BUILD=release. [0,1,default]
!ifndef DEBUG_FLAG
DEBUG_FLAG = default
!endif

# Multiple libraries or single huge monolithic one? [0,1]
!ifndef MONOLITHIC
MONOLITHIC = 0
!endif

# Build GUI libraries? [0,1]
!ifndef USE_GUI
USE_GUI = 1
!endif

# Build wxHTML library (USE_GUI must be 1)? [0,1]
!ifndef USE_HTML
USE_HTML = 1
!endif

# Build multimedia library (USE_GUI must be 1)? [0,1]
!ifndef USE_MEDIA
USE_MEDIA = 1
!endif

# Build wxXRC library (USE_GUI must be 1)? [0,1]
!ifndef USE_XRC
USE_XRC = 1
!endif

# Build wxAUI library (USE_GUI must be 1)? [0,1]
!ifndef USE_AUI
USE_AUI = 1
!endif

# Build wxRichTextCtrl library (USE_GUI must be 1)? [0,1]
!ifndef USE_RICHTEXT
USE_RICHTEXT = 1
!endif

# Build OpenGL canvas library (USE_GUI must be 1)? [0,1]
!ifndef USE_OPENGL
USE_OPENGL = 0
!endif

# Build ODBC database classes (USE_GUI must be 1)? [0,1]
!ifndef USE_ODBC
USE_ODBC = 0
!endif

# Build quality assurance classes library (USE_GUI must be 1)? [0,1]
!ifndef USE_QA
USE_QA = 0
!endif

# Enable exceptions in compiled code. [0,1]
!ifndef USE_EXCEPTIONS
USE_EXCEPTIONS = 1
!endif

# Enable run-time type information (RTTI) in compiled code. [0,1]


!ifndef USE_RTTI
USE_RTTI = 1
!endif

# Enable threading in compiled code. [0,1]
!ifndef USE_THREADS
USE_THREADS = 1
!endif

# Link with gdiplus.lib? (Needed for wxGraphicsContext, will also set wxUSE_GRAPHICS_CONTEXT) [0,1]
!ifndef USE_GDIPLUS
USE_GDIPLUS = 0
!endif

# Is this official build by wxWidgets developers? [0,1]
!ifndef OFFICIAL_BUILD
OFFICIAL_BUILD = 0
!endif

# Use this to name your customized DLLs differently 
!ifndef VENDOR
VENDOR = custom
!endif

#
!ifndef WX_FLAVOUR
WX_FLAVOUR = 
!endif

#
!ifndef WX_LIB_FLAVOUR
WX_LIB_FLAVOUR = 
!endif

# Name of your custom configuration. This affects directory
# where object files are stored as well as the location of
# compiled .lib files and setup.h under the lib/ toplevel directory. 
!ifndef CFG
CFG = 
!endif

# Compiler flags needed to compile test suite in tests directory. If you want
# to run the tests, set it so that the compiler can find CppUnit headers. 
!ifndef CPPUNIT_CFLAGS
CPPUNIT_CFLAGS = 
!endif

# Linker flags needed to link test suite in tests directory. If you want
# to run the tests, include CppUnit library here. 
!ifndef CPPUNIT_LIBS
CPPUNIT_LIBS = 
!endif

# Version of C runtime library to use. You can change this to
# static if SHARED=0, but it is highly recommended to not do
# it if SHARED=1 unless you know what you are doing. [dynamic,static]
!ifndef RUNTIME_LIBS
RUNTIME_LIBS = dynamic
!endif
[解决办法]
接分

热点排行