I want to build a 16 bit static library (.lib) using masm. The file would be OMF lib not COFF which is 32 bit. When I am using lib.exe /out:mylib.lib command it issues an error.
LINK : error : Segment reference in fixup record
mylib.obj : fatal error LNK1123: failure during conversion to COFF: file invalid
or corrupt
I have no idea, can any one help me please.
Thanks in advance
haven't tried that for years :bg
maybe you just need to use an older version of LIB.EXE, like the one that came with MASM v5.10
Thanks for quick reply, I am also doing 16 bit programming after long time. I know its obsolete, but its fun. Everywhere I am looking they are talking about COFF static library or even the stub lib file for the DLL. But my want is very simple, good old OMF lib. :'(
Can you please tell me where can I get MASM 5.14? I mean a genuine source like your site MAsm32.com or Microsoft where the files are not supposed to be infected. I found some torrents, but don't know how genuine copies they are sharing.
not sure there ever was a v5.14
but, i have v5.10...
http://www.4shared.com/file/Wly0gEmx/masm510.html
I downloaded the zip and found four folders there, but whenever I am executing it, its popping up an error message that lib.exe is not a valid win32 application. :'(
But thanks anyways, you are trying to help me.
you must be running a 64-bit OS ???
Microsoft (R) Library Manager Version 3.10
Copyright (C) Microsoft Corp 1983-1988. All rights reserved.
Library name:
i extracted this from the above zip
if you still have problems, maybe i need to upload the file again
No dave, I am using 32 bit Windows. And I can run other 16 bit applications. Lets see this time.
Thanks :bg :wink
The old lib.exe actually used the OS/2 subsystem, not sure if that is still around in vista/7
Oh no, I figured out the problem. Actually yesterday, just to test I temporarily disabled 16 bit application mode. Then again enabled it. Maybe because of that some 16 bit apps are not running properly. I think I need to restart the machine. I have DOSBOX. I ran your file lib.exe there and its running smoothly over there. But from command prompt its showing the error dialog. I didn't realise it because, other 16 bit apps, are still running from command prompt
Thanks a lot, You've made it. :U :U :clap:
Pras :boohoo:
Quote from: praschat on July 21, 2011, 09:42:34 AM
Oh no, I figured out the problem. Actually yesterday, just to test I temporarily disabled 16 bit application mode. Then again enabled it. Maybe because of that some 16 bit apps are not running properly. I think I need to restart the machine. I have DOSBOX. I ran your file lib.exe there and its running smoothly over there. But from command prompt its showing the error dialog. I didn't realise it because, other 16 bit apps, are still running from command prompt
Thanks a lot, You've made it. :U :U :clap:
Pras :boohoo:
You also have a point. Maybe thats why I am able to run it only under DOSBOX, but not from command prompt. So maybe it has no connection with my temporarily disabling of 16 bit mode. :wink
Quote from: dedndave on July 20, 2011, 08:20:07 PM
haven't tried that for years :bg
maybe you just need to use an older version of LIB.EXE, like the one that came with MASM v5.10
I think that it needs just old linker. lib work ok, but new 32 bit link.exe requires coff and do not accept omf.
i use hutch's masm32 and old linker to make all of my dos apps and libs.
Quote from: Rockphorr on July 22, 2011, 06:18:53 AM
I think that it needs just old linker. lib work ok, but new 32 bit link.exe requires coff and do not accept omf.
i use hutch's masm32 and old linker to make all of my dos apps and libs.
Can you tell me then how to use the link16 (old linker) to create lib instead of exe?
the old linker cannot create LIB's
however, it does link OMF files
i don't think that matters with the old software
your LIB will contain unlinked OMF files :P
Quote from: praschat on July 22, 2011, 10:59:34 AM
Quote from: Rockphorr on July 22, 2011, 06:18:53 AM
I think that it needs just old linker. lib work ok, but new 32 bit link.exe requires coff and do not accept omf.
i use hutch's masm32 and old linker to make all of my dos apps and libs.
Can you tell me then how to use the link16 (old linker) to create lib instead of exe?
You use new version of lib(from hutch's masm32) to make lib and use old version of link to (obj+lib)->.exe
AFAIK lib works so: lib(objs)->your.lib