Board index » cppbuilder » linker error - invalid OMF record

linker error - invalid OMF record

I'm using Borland's Builder 3.0 and I'm getting a strange linker error when
I'm trying to compile a Win95 level library. I have added the LIB file to my
project, but when the compilation gets to the linking phase, I get the
following error message. Any suggestions?

[LinkerError] 'THEIRLIBRARY.LIB' contains invalid OMF record, type 0x21

Thanks,
Robert

Robert G. Hoover
TriTek Corp.
http://www.TriTekCorp.com

Doug Farris & Company
http://www.TriTekCorp.com/dfc

____________________________________________________________________________

 

Re:linker error - invalid OMF record


Inprise uses the OMF format, M$ COFF.  The lib files are not
compatable.  If this is an import lib then you can either use coff2omf
to convert the lib file or use implib (and possibly impdef) to create a
OMF lib file from the dll.  If this is a static lib it's harder.  Static
libs are not cross compiler even if they are the same format.  You will
need to just roll the lib file into a dll and the create a OMF lib file
for inclusion.

Jeff Overcash

Quote
"Robert G. Hoover" wrote:

> I'm using Borland's Builder 3.0 and I'm getting a strange linker error when
> I'm trying to compile a Win95 level library. I have added the LIB file to my
> project, but when the compilation gets to the linking phase, I get the
> following error message. Any suggestions?

> [LinkerError] 'THEIRLIBRARY.LIB' contains invalid OMF record, type 0x21

> Thanks,
> Robert

> Robert G. Hoover
> TriTek Corp.
> http://www.TriTekCorp.com

> Doug Farris & Company
> http://www.TriTekCorp.com/dfc

> ____________________________________________________________________________

Re:linker error - invalid OMF record


Quote
> [LinkerError] 'THEIRLIBRARY.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.
Here's a short answer as found in the BCB Q&Q pages:

http://www.inprise.com/devsupport/bcppbuilder/qna/651.html

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.inprise.com/devsupport/bcppbuilder/qna/794.html

+===================================================+
| Jonathan Arnold (mailto:jdarn...@buddydog.org)    |
| Engineering Manager       Roger Wagner Publishing |
| http://people.ne.mediaone.net/jdarnold            |
+===================================================+

 Diplomacy is the art of saying "Nice doggie" until
 you can find a rock.   -- Will Rogers

Other Threads