CSDN博客

img yunin

Indy10 for C++ builder 6 编译笔记

发表于2004/6/26 15:03:00  5587人阅读

分类: C++ Builder

1、在$(BCB)目录下创建一个名为indy10C6/Source的目录;
2、下载indy.zip,改名为indy-10-2004-06-09.zip,将indy-10-2004-06-09.zip解压到Source目录下;
3、设置环境变量
SET NDC6=C:/tools/CBC6
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]
  -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                  

0 0

相关博文

我的热门文章

img
取 消
img