Backtrack:  
 
by lunarg on June 11th 2012, at 17:24

By default, import libraries (.lib files) made for MSVC are not compatible with Borland C Builder and Borland Delphi. Since version 6 of Borland C++ Builder, there's a tool which can convert these files in COFF format to OMF format. The tool is called coff2omf and resides in the Bin directory of your Borland installation.

Simply run the file as follows (be sure your path etc. is correct):

coff2omf mylib.lib mylib2.lib

Then, use the mylib2.lib file you just created and add it to your project.

Notice
The coff2omf tool only works properly if the library exports plain C functions. If C++ classes or mangled function names get exported, you usually get linker errors. If this is the case, try obtaining the Borland library, or use the dynamic method of LoadLibrary and GetProcAddressA.

Try using this method if you get a linker error like this:

"Invalid OMF record type 0x21 (possibly COFF)"
 
 
« April 2024»
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    
 
Links
 
Quote
« Debating Windows vs. Linux vs. Mac is pointless: they all have their merits and flaws, and it ultimately comes to down to personal preference. »
Me