Browse KB Articles
Using our DLLs with Borland C++ Builder
KB Number: 10143
This article describes the steps necessary to make our DLLs compatible with Borland C++ Builder.
Our DLLs are designed to operate with the Microsoft Visual Studio environment, which by default packs structures on 8-byte boundaries. By default, Borland assumes that structures are packed on 1-byte boundaries, which requires the user to define the packing scheme manually. To do so, preface all our header (.h) files with:
In order to link to these DLLs using Borland's C++ Builder, use the COFF to OMF C DLL import library utility provided with the Borland package.
For example, to convert the PGRFlyCapture DLL:
You can then link the new PGRFCbcc.lib into an existing C++ Builder project.
There is an option in the C++ Builder compiler called: "Treat enum types as int". Turn on this option to avoid accidental overwriting of any user-defined buffers.
This may also resolve the issue that some Borland users have reported where
Note: There are unconfirmed instances where customers using a version of the Borland compiler prior to 6.0 have had to convert library files to the earlier COFF format before using coff2omf.exe. You can use Microsoft's linker to convert the files to the earlier COFF format:
You can then use coff2omf normally.