Board index » cppbuilder » invalid OMF record, type 0x21

invalid OMF record, type 0x21

Help:
     Can anyone tell me the meaning of the Linker error " file.lib' contains
invalid OMF record, type 0x 21". I get this error when trying to link to a
third party library. I have used the implib tool to compile and link but the
function calls do not work . I can not find documentation for this error
code.Can anyone help?

John  Shaw

 

Re:invalid OMF record, type 0x21


: "John Shaw" <js...@aeneas.com> wrote:

Quote
>     Can anyone tell me the meaning of the Linker error " file.lib' contains
>invalid OMF record, type 0x 21".

Yes. You probably try to link to a VC++ LIB. This will not work. The FAQ

  "Invalid OMF record"

at

  http://www.borland.com/devsupport/bcppbuilder/faq/

has more details.

Re:invalid OMF record, type 0x21


Quote
>      Can anyone tell me the meaning of the Linker error " file.lib' contains
> invalid OMF record, type 0x 21". I get this error when trying to link to a

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.
There is a utility called COFF2OMF that might do the trick.
You can also do it yourself using impdef and such.  A few pages
that are "Must See" for using 3rd party DLLs:

http://www.pacifier.com/~jgibbon/program_tip_4.html
http://www.borland.com/devsupport/bcppbuilder/faq/FAQ1809C.html
http://www.bcbdev.com/articles/vcdll.htm

+===================================================+
| Jonathan Arnold (mailto:jdarn...@buddydog.org)    |
| http://www.buddydog.org                           |
+===================================================+

Sigstad's Law: When your turn comes, the rules change.

Other Threads