上篇大概數了下怎麼調用DCC32然後給了幾個選項的解釋,不過,那些選項都很粗糙,現在,我詳細說下自己的理解,當然,這個是個人理解,可能不是很準確,歡迎大家更正,先謝謝了O(∩_∩)O。
本文地址:http://blog.csdn.net/sushengmiyan/article/details/10285347
ID:sushengmiyan
先看看當我們成功調用了DCC32之後的dos提示資訊吧,我把那些資訊都貼在下面了:
// DCC32編譯器的設定說明。//CodeGear Delphi for Win32 compiler version 18.0//Copyright (c) 1983,2005 CodeGear////Syntax: dcc32 [options] filename [options]//// -A<unit>=<alias> = Set unit alias// -B = Build all units // -CC = Console target // -CG = GUI target // -D<syms> = Define conditionals // -E<path> = EXE/DLL output directory// -F<offset> = Find error // -GD = Detailed map file // -GP = Map file with publics // -GS = Map file with segments // -H = Output hint messages // -I<paths> = Include directories // -J = Generate .obj file // -JPHNE = Generate C++ .obj file, .hpp file, in namespace, export all// -K<addr> = Set image base addr // -LE<path> = package .bpl output directory// -LN<path> = package .dcp output directory// -LU<package> = Use package // -M = Make modified units // -N0<path> = unit .dcu output directory// -NH<path> = unit .hpp output directory// -NO<path> = unit .obj output directory// -NB<path> = unit .bpi output directory// -NS<namespaces> = Namespace search path// -O<paths> = Object directories // -P = look for 8.3 file names also// -Q = Quiet compile // -R<paths> = Resource directories // -U<paths> = Unit directories // -V = Debug information in EXE // -VR = Generate remote debug (RSM)// -W[+|-][warn_id] = Output warning messages// -Z = Output 'never build' DCPs // -$<dir> = Compiler directive // --help = Show this help screen // --version = Show name and version// --codepage:<cp> = specify source file encoding// --default-namespace:<namespace> = set namespace// --depends = output unit dependency information// --doc = output XML documentation // --drc = output resource string .drc file// --no-config = do not load default DCC32.CFG file//Compiler switches: -$<letter><state> (defaults are shown below)// A8 Aligned record fields // B- Full boolean Evaluation // C+ Evaluate assertions at runtime// D+ Debug information // G+ Use imported data references // H+ Use long strings by default // I+ I/O checking // J- Writeable structured consts // L+ Local debug symbols // M- Runtime type info // O+ Optimization // P+ Open string params // Q- Integer overflow checking // R- Range checking // T- Typed @ operator // U- Pentium(tm)-safe divide // V+ Strict var-strings // W- Generate stack frames // X+ Extended syntax // Y+ Symbol reference info // Z1 Minimum size of enum types
東西比較多,不可能全部都說,大概我們平時用到的,我都會說一下,如果大家平時有經常用的,可以及時給我補充,O(∩_∩)O謝謝
首先,我寫了一個注釋,說明下面都是DCC32編譯器的說明。
下面就是具體的文法介紹, DCC32 [操作選項] 檔案名稱 [操作選項]
其中,選項 -A是指,給單元設定別名,這個選項目前一般不在使用,不過多介紹。
-B 編譯所有的單元,這個肯定對於編譯項目的時候是必選的,要不然,漏一個dcu就不能正常產生了唄,好理解。
-CC 指定編譯目標,如果你寫的是console程式,那麼你就選這個,否則一般情況下,我們選擇的是可視化編輯,就是 -CG
-CG 可理解,就是現在windows的可視化程式,不是CMD那樣的dos程式。
-D 編譯條件符號定義
-E 制定產生的EXE的路徑,即可執行檔的輸出地方
-F 是否關閉尋找運行期間錯誤
-GD 產生詳細的Map檔案,map檔案,不同於可二進位的可執行檔和.dcu檔案,.map檔案是一個可讀的文字檔,可以被列印或是其它文字編輯器編輯
-GP 產生map的public欄位
-GS 產生map的segment欄位 一個.MAP檔案被分成三個節:Segment 、 Publics 、Line Numbers
-H 輸出提示資訊
-I 檔案包含路徑 可用
-J 產生 .obj檔案 不怎麼使用
-JPHNE 產生C++的obj檔案
--K 圖片檔案基址
-LE .bpl檔案輸出路徑 常用
-LN .dcp檔案輸出路徑 常用
-LU 使用的運行期列表
-M 編譯有變化的單元
-NO 單元的dcu輸出路徑 常用
-NH 單元的.hpp輸出路徑
-O obj檔案
-P 8.3檔案格式(不懂)
-Q 安靜模式 ?啥意思 選不選有啥區別,誰給個解釋
-R資源檔(.res)路徑
-V 產生debugger調試資訊檔
這個東西貌似網上也能搜的到,不過貌似都很稀少,這裡給整理一下,然後方便自己尋找,也方便後來人,如果想找的話,少走些彎路。