Board index » cppbuilder » Linker Error linking third-party library - "contains invalid OMF record"

Linker Error linking third-party library - "contains invalid OMF record"

I would like to link in a third-party library.  I keep getting the error:
        Linker Error 'G:\SDKWIN32\LIB\SRS_MAPI.LIB' contains invalid OMF record,
type 0x21

The Borland help for this error says, "The object file is corrupt.
Regenerate it, or contact Borland Technical Support."

Thank you for your assistance.

 

Re:Linker Error linking third-party library - "contains invalid OMF record"


MS library files are incompatible with Borland.
You either need to get a DLL version of the file and run IMPLIB on it to get
a Borland import library
or get the vendor to give you Borland compatible libraries

Rgds Pete

Quote
Jennifer Suess wrote in message <01bd92ee$382baca0$1b23accf@lily>...
>I would like to link in a third-party library.  I keep getting the error:
> Linker Error 'G:\SDKWIN32\LIB\SRS_MAPI.LIB' contains invalid OMF record,
>type 0x21

>The Borland help for this error says, "The object file is corrupt.
>Regenerate it, or contact Borland Technical Support."

>Thank you for your assistance.

Re:Linker Error linking third-party library - "contains invalid OMF record"


Quote
> I would like to link in a third-party library.  I keep getting the error:
>         Linker Error 'G:\SDKWIN32\LIB\SRS_MAPI.LIB' contains invalid OMF record,
> type 0x21

You can't use a static library made for VC++ (or any other compiler for
that matter).  Static libraries are not cross-compiler, for any number
of reasons, from naming conventions to internal structure differences.

If it is an import library for a DLL, then you can roll your own.  Under
BCB3, there is a new utility called COFF2OMF that might do the trick.
You can also do it yourself using impdef and such.  A couple of pages
that are "Must See" for using VC++ DLLs:

http://www.pacifier.com/~jgibbon/program_tip_4.html
http://www.borland.com/devsupport/bcppbuilder/qna/qnaspage.html

+===================================================+
| Jonathan Arnold (mailto:jdarn...@world.std.com)   |
| Senior Engineer           Roger Wagner Publishing |
| http://people.ne.mediaone.net/jdarnold            |
+===================================================+

"I can picture a world without war, a world without hate.
 And I can picture us attacking that world,
 because they'd never expect it." -- Vijay Iyer

Other Threads