Java/C/C++/C#/PHP 到 Pascal 转换器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6003643/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 13:56:42  来源:igfitidea点击:

Java/C/C++/C#/PHP to Pascal converter?

javac++cdelphipascal

提问by ThatJoeGuy

Does anyone know if there is a Java/C/C++/C#/PHP to Pascal converter?

有谁知道是否有 Java/C/C++/C#/PHP 到 Pascal 转换器?

采纳答案by Seth Carnegie

H2Pasis a popular tool to convert C headers to Pascal. I don't know of any to actually convert C code to Pascal code though.

H2Pas是将 C 头文件转换为 Pascal 的流行工具。我不知道有什么可以将 C 代码实际转换为 Pascal 代码。

From a quick google search, I see several that may or may not be good:

从快速的谷歌搜索中,我看到几个可能好也可能不好:

I am tempted to say you'll have to do a lot of it by hand one way or another.

我很想说您必须以​​某种方式手动完成很多工作。

回答by avra

C to Pascal converters:

C 到帕斯卡转换器:

  1. http://cc.embarcadero.com/item/26951
  2. http://www.drbob42.com/delphi/headconv.htm
  3. http://rvelthuis.de/programs/convertpack.html
  4. http://www.astonshell.com/freeware/c2pas32
  5. http://www.cadkas.com/ec2delphi.php
  6. http://c2pas.sourceforge.net
  7. http://wiki.lazarus.freepascal.org/H2Pas
  8. http://wiki.freepascal.org/Chelper
  1. http://cc.embarcadero.com/item/26951
  2. http://www.drbob42.com/delphi/headconv.htm
  3. http://rvelthuis.de/programs/convertpack.html
  4. http://www.astonshell.com/freeware/c2pas32
  5. http://www.cadkas.com/ec2delphi.php
  6. http://c2pas.sourceforge.net
  7. http://wiki.lazarus.freepascal.org/H2Pas
  8. http://wiki.freepascal.org/Chelper

Tips for conversion from C:

从 C 转换的提示:

Biggest time saver tip for header conversion from C is to find a VB header and convert it with VB converter mentioned in other answer. This was almost always fully automated and changes I had to make were none or minor!

从 C 进行标头转换的最大节省时间提示是找到一个 VB 标头并使用其他答案中提到的 VB 转换器进行转换。这几乎总是完全自动化的,我必须做的更改没有或很小!

回答by naXa

There was released Android2DelphiImport toola short time ago. This tool is designed for XE5, and automates the import unit writing by generating a pascal wrapper unit from jar. It is a commercial package.
Here are another two similar tools - Utility to generate Java Android class and jar file interfaces for Delphi XE5 Firemonkey('JavaToPas' and 'JavaImport For Android').

不久前发布了Android2DelphiImport 工具。这个工具是为 XE5 设计的,通过从 jar 生成一个 pascal 包装单元来自动化导入单元的编写。它是一个商业包。
这是另外两个类似的工具 -为 Delphi XE5 Firemonkey 生成 Java Android 类和 jar 文件接口的实用程序(“JavaToPas”和“JavaImport For Android”)。