国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > C++ > 正文

如何將C/C++程序轉(zhuǎn)譯成Delphi(三)

2019-11-18 18:50:30
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

2.2. Unit dependencies

C and C++ use #include to include header files in another header file or a source file. Delphi refers to units (in the USES clause) instead of header files.

For example

  • D3D.H includes D3DTYPES.H, D3DCAPS.H
  • D3DTYPES.H includes DDRAW.H
  • One unit contains one translation of a header file, so incorporation of D3DTYPES.H and D3DCAPS.H is required when translating D3D.H.

Thus the translation of D3D.H (D3D.PAS) needs D3DTYPES.PAS and D3DCAPS.PAS in uses.

In Windows.pas Borland has already done a lot of work for us. Borland's windows unit contains most of the basic Windows datatypes, so any translated unit needing Windows datatypes needs the Windows unit in its uses clause.

Note: In Delphi 1.0, substitute WinPRocs.pas and WinTypes.pas for Windows.pas, since these two units include for Delphi 16-bit what Delphi 32-bit defines in Windows.pas. In Delphi 2 these two files are also aliased to Windows.pas in Delphi 32-bit versions for backward compatibility. Some header files contain source which is not directly translatable into Pascal, but the header file's impact on compilation must be incorporated into the translated code. For example, PSHPACK?.H contains compiler directives that are not directly translatable to Delphi; PSHPACK4.H directs the compiler to use 4-byte packing. More about this later.


Back to contents


上一篇:如何將C/C++程序轉(zhuǎn)譯成Delphi(四)

下一篇:如何將C/C++程序轉(zhuǎn)譯成Delphi(二)

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
學(xué)習(xí)交流
熱門圖片

新聞熱點(diǎn)

疑難解答

圖片精選

網(wǎng)友關(guān)注

主站蜘蛛池模板: 万宁市| 依安县| 西宁市| 崇左市| 大港区| 南江县| 舞钢市| 右玉县| 得荣县| 绥中县| 荥阳市| 新和县| 卓尼县| 庆云县| 玉溪市| 神木县| 广元市| 合江县| 衢州市| 绥芬河市| 大冶市| 上蔡县| 安图县| 柳江县| 南汇区| 宣威市| 正镶白旗| 陇川县| 新疆| 阜城县| 保山市| 永寿县| 遵义市| 东方市| 丰城市| 张家川| 铁力市| 宜兰市| 运城市| 诸暨市| 太原市|