www.digitalmars.com         C & C++   DMDScript  

c++.dos.16-bits - fatal error LNK1123

reply connie <conniejwang gmail.com> writes:
Hi all, I'm trying to compile my code and get this error:

LINK : error : Segment reference in fixup record
Tgu_srv.obj : fatal error LNK1123: failure during conversion to COFF: file
invalid or corrupt

--- errorlevel 1123

Does anybody know how to fix this? It's been suggested that it's a 16bit vs
32bit issue. I have downloaded that 16bit DOS addon and it's in the correct
directory as far as I can tell (c:\dm\bin and c:\dm\lib). But the error
persists.

How does the compiler know that my target is 16bit DOS?

Thanks.
Connie
Nov 01 2006
parent reply connie <conniejwang gmail.com> writes:
Hi I was just notified that this isn't a Digital Mars linker error. Apparently
it's being spit out from Microsoft Incremental Linker. I never specified which
linker to use in my makefile. Does this mean the default is Microsoft
Incremental
Linker? Do people usually use this particular linker with Digital Mars C
compiler?
What about Optlink? How do I determine which linker to use? Thanks in advance
for
helping me out!
Nov 01 2006
parent Arjan <arjan ask.me> writes:
connie wrote:
 Hi I was just notified that this isn't a Digital Mars linker error. Apparently
 it's being spit out from Microsoft Incremental Linker. I never specified which
 linker to use in my makefile. Does this mean the default is Microsoft
Incremental
 Linker? Do people usually use this particular linker with Digital Mars C
compiler?
 What about Optlink? How do I determine which linker to use? Thanks in advance
for
 helping me out!
Normally one uses the linker wich accompanies the compiler. In the case of dmc optlink. The executable name is link.exe which is also the name of the MS linker. It seems like the PATH enviroment variable has the MS compiler bin dir so this link.exe is found before the dmc link.exe. Change the PATH setting or explicit specify the location of the linker executable to use in the make file. Arjan Knepper
Nov 04 2006