关键字:Indy10,BCB,安装,FullC6,C++Builder,组件
作者:yunin 更新:2006-12-13 22:53:15 浏览:14424
Indy组件是一套优秀的开源的网络编程组件,虽然开源,但是在BCB中的安装却是比较的复杂。特转载yunin原创的文档一篇,以作参考:
1、在$(BCB)目录下创建一个名为indy10C6/Source的目录
2、下载indy.zip,解压到Source目录下
3、设置环境变量
SET NDC6=C:/Program Files/Borland/CBuilder6
SET NDWINSYS=C:/WINDOWS/System32
4、几个package之间的依赖关系(从*60.dpk文件中得到):
========> IndySystem60 <=================||
|| ^^ ||
|| || ||
|| IndyCore60 <== dclIndyCore60 ||
|| ^^ ^^ ^^ ||
|| || ==============|| || ||
|| || || || ||
||======= IndyProtocols60 <== dclIndyProtocols60
^^
||
IndySuperCore <== dclSuperCore (好像只有dehpi7.0版本的,不知C++ Builder 6能否支持?)
5、手工编译
创建$(BCB)/indy10C6/buildC6及$(BCB)/indy10C6/objs目录
Copy每个包所需要的.pas、.inc、.dpk、.res、.obj(IndyProtocols60的Zlib有用到)文件到$(BCB)/indy10C6/buildC6目录下(不会用-I及-U选项,老有问题,才出如此下策)
5.1先编译IndySystem60:
dcc32.exe IndySystem60.dpk /O../objs /DBCB /M /H /W /JPHN -$d-l-n+p+r-s-t-w-y-
dcc32.exe IndySystem60.dpk /O../objs /DBCB /M /H /W -$d-l-n+p+r-s-t-w-y-
../Source/Win32/LspFix IndySystem60.lsp
tlib.exe IndySystem60.lib /P32 @IndySystem60.lsp
完成IndySystem60.bpl及IndySystem60.lib的编译。
5.2、接着编译IndyCore60
dcc32.exe IndyCore60.dpk /O../objs /DBCB /M /H /W /JPHN -$d-l-n+p+r-s-t-w-y-
dcc32.exe IndyCore60.dpk /O../objs /DBCB /M /H /W -$d-l-n+p+r-s-t-w-y-
../Source/Win32/LspFix IndyCore60.lsp
tlib.exe IndyCore60.lib /P32 @IndyCore60.lsp
编译IndyProtocols60.dpk之前,单独编译IdCompressionIntercept.pas及IdDummyUnit.pas
dcc32.exe IdCompressionIntercept.pas /O../Source/objs /DBCB /M /H /W /JPHN -$d-l-n+p+r-s-t-w-y-
dcc32.exe IdDummyUnit.pas /LIndy60.dcp /DBCB /O../Source/objs /M /H /W /JPHN -$d-l-n+p+r-s-t-w-y-
附录:编译命令分析
%NDC6%/bin/dcc32.exe IndyCore60.dpk /O../Source/objs /DBCB /M /H /W /JPHN -$d-l-n+p+r-s-t-w-y- %2 %3 %4
%NDC6%/bin/dcc32.exe IdCompressionIntercept.pas /M /DBCB /O../Source/objs /H /W /JPHN -$d-l-n+p+r-s-t-w-y- %2 %3 %4
1、%NDC6%/bin/dcc32.exe
这是编译pascal编译工具
2、/M
根据Indy相关的文件描述,不能用/B参数,用这个来一个一个地编译
3、/DBCB
定义一个BCB编译宏
4、/O
指示目标码的目录,好像不起作用,不能放在相应的地方
5、/H
编译输出提示信息
6、/JPHN
没有完全搞明白,/JP是说明要生成C++用的obj文件,但是多了HN是做些什么呢?
7、-$d-l-n+p+r-s-t-w-y-
-$编译开关起始符,含义如下:
d-:表示不要生成调试信息
l-:去掉本地调试符号
n+:没有搞明白
p+:开启字符串参数
r-:不做范围检查
s-:没有搞明白
t-:Typed @ operator,off
w-:Generate stack frames,off
y-:Symbol reference info,off
dcc32完整的参数表:
Syntax: dcc32 [options] filename [options]
// 本文转自 C++Builder研究 - http://www.ccrun.com/article.asp?i=1001&d=d6c4ns
-A<unit>=<alias> = Set unit alias -LU<package> = Use package
-B = Build all units -M = Make modified units
-CC = Console target -N<path> = DCU output directory
-CG = GUI target -O<paths> = Object directories
-D<syms> = Define conditionals -P = look for 8.3 file names also
-E<path> = EXE output directory -Q = Quiet compile
-F<offset> = Find error -R<paths> = Resource directories
-GD = Detailed map file -U<paths> = Unit directories
-GP = Map file with publics -V = Debug information in EXE
-GS = Map file with segments -VR = Generate remote debug (RSM)
-H = Output hint messages -W = Output warning messages
-I<paths> = Include directories -Z = Output 'never build' DCPs
-J = Generate .obj file -$<dir> = Compiler directive
-JP = Generate C++ .obj file --help = Show this help screen
-K<addr> = Set image base addr --version = Show name and version
Compiler switches: -$<letter><state> (defaults are shown below)
A8 Aligned record fields P+ Open string params
B- Full boolean Evaluation Q- Integer overflow checking
C+ Evaluate assertions at runtime R- Range checking
D+ Debug information T- Typed @ operator
G+ Use imported data references U- Pentium(tm)-safe divide
H+ Use long strings by default V+ Strict var-strings
I+ I/O checking W- Generate stack frames
J- Writeable structured consts X+ Extended syntax
L+ Local debug symbols Y+ Symbol reference info
M- Runtime type info Z1 Minimum size of enum types
O+ Optimization
(ccrun)注:本文转载到本站后略修改几个字。
友情提示:Indy组件官方网站:http://www.indyproject.org
本文转自:http://blog.csdn.net/yunin/archive/2004/06/26/27185.aspx#450949