OMF format for COFF format

Is there any tool like Borland "coff2omf.exe" to convert Borland OMF LIB format to MS VC ++ COFF LIB format?

Actually I want to create a .obj file in delphi and use it in MSVC ++.

+4
source share
2 answers

As far as I know, there is no such tool. Using the Agner Fog object converter, the tool Arno refers to, I never managed to convert the Delphi block to COFF.obj, which can be linked to the MSVC program.

I really think it's unrealistic to take the Delphi source code, compile it, and then use the generated object in MSVC. Another direction is quite possible. You can compile C code for an object and associate this object with your Delphi executable. When you do this, you need to resolve any dependencies that the compiled object has.

But to associate a Delphi object with a C / C ++ program, you need some part of the Delphi RTL you are using. And it will be difficult if you are not using any part of Delphi RTL, which seems unlikely.

In your situation, I think your options are:

  • Put the code in C or C ++.
  • Compile Delphi code into a dynamic library and link it to your C ++ program.
+4
source

Yes, there is such a tool.

See this tool .

This utility can be used to convert object files between COFF / PE, OMF, ELF, and Mach-O formats for all 32-bit and 64-bit x86 platforms. Can change symbol names in object files. It can create, modify and transform function libraries on different platforms. Can delete object files and executable files. Also includes a very good disassembler that supports instruction sets SSE4, AVX, AVX2, FMA and XOP. Source Code Included (GPL). Leadership.

Please note that this http://www.agner.org website is the best resource I know about low-level optimization. All related information is worth reading if you want to deal with performance.

But for using Delphi-generated .obj with VC ++ it will not be easy, but for a very small part of the code. You will need the Delphi RTL used in your code. External .dll much better. Also note that some types (e.g. strings or dynamic arrays) will not be easily modified in VC ++.

+7
source

Source: https://habr.com/ru/post/1484153/


All Articles