hello
this is my first post here, and i have a trouble....

I'm trying to compile a emulator that was written in MSVC++ and NASM, but i have Borland C++ Builder 5, and i have a problem while trying to link:

'F:\EMUS\GENESIS\SRC\VC\GENS.12\GENS\Z80.OBJ' contains invalid OMF record, type 0x4c (possibly COFF)


because i can't compile NASM .asm files with TASM, i've compiled with nasm and included the .obj sources to the project., but i got that damn error

The COFF2OMF utility does not help me here, because it generates 512-byte-corrupted files.

How i can convert NASM-to-TASM?, or, how i can convert .obj COFF-to-OMF without using that stupid coff2omf?

BTW: i don't know very much assembler, i just want to compile that program

Help!!!
Posted on 2003-07-03 11:03:25 by tomman
You don't have to do that... Nasm will output an OMF file if you use the switch -f obj.
Posted on 2003-07-03 13:21:35 by Sephiroth3
yes, i know that, but NASM OMF files are for DOS 16-bit, not for Windows, and Borland's linker reject it (it give another error).
Posted on 2003-07-03 21:09:37 by tomman
Tomman,

Don't give up my friend,have you tried the coff2omf tool developed by Digital Mars?

ftp://ftp.digitalmars.com/Digital_Mars_C++/Patch/COFF2OMF.zip

This tool is able to convert MS COFF obj files and import libs to OMF.

You can read the documentation available from:

http://www.digitalmars.com/ctg/ctg.html
Posted on 2003-07-04 07:52:46 by Vortex
thanks, pal! :grin:
but this coff2omf does not worked with .lib (it crashes)

well, don't worry, i founded the bcb ports for that libs (zlib and htmlhelp)
:alright:
Posted on 2003-07-04 13:43:03 by tomman
Glad you found a solution. BTW you can use LIB.EXE to extract an OBJ file:

LIB /EXTRACT:File.OBJ MyLib.LIB

To get a list of valid OBJ files:

LIB /LIST:OutFile.txt MyLib.LIB

I had to extract the full ZLIB library as GoLink does not accept lib files, the extractable procedures are:

adler32.obj
chkstk.obj
compress.obj
crc32.obj
deflate.obj
gvmat32.obj
gvmat32c.obj
gzio.obj
infblock.obj
infcodes.obj
inffast.obj
inflate.obj
inftrees.obj
infutil.obj
ioapi.obj
trees.obj
uncompr.obj
unzip.obj
zip.obj
zutil.obj
zlib.res
Posted on 2003-07-04 13:46:25 by donkey