A very strange linker error appears:
link.exe : fatal error LNK1107: invalid or corrupt file: cannot read at 0x270
But this is strange, because usually an error message tells you which object is invalid or damaged. In other words, usually this error message looks something like this:
myDLL.dll : fatal error LNK1107: ....
However, in this case, the invalid object is the application itself (link.exe) that works!
I tried to replace the executable with another copy, which, as I know, is valid. The same error.
The command that I run is this:
../vendor/microsoft/msdev80_2005/VC/bin/link.exe /NOLOGO /SUBSYSTEM:CONSOLE /LIB
PATH:../vendor/microsoft/msdev80_2005/VC/atlmfc/lib /LIBPATH:../vendor/microsoft
/msdev80_2005/VC/lib /LIBPATH:../vendor/microsoft/msdev80_2005/VC/PlatformSDK/Li
b /LIBPATH:lib/win32/dbg /OUT:bin/win32/dbg/bugshow.exe Advapi32.lib ws2_32.lib
bugshow/obj/win32/dbg/main.o libA.lib libB.lib libC.lib libD.lib
main.o compiles using the following compiler directive:
../vendor/microsoft/msdev80_2005/VC/bin/cl.exe /nologo /X /w /EHsc -I../vendor/m
icrosoft/msdev80_2005/VC/atlmfc/include -I../vendor/microsoft/msdev80_2005/VC/in
clude -I../vendor/microsoft/msdev80_2005/VC/PlatformSDK/Include /D_WIN32 /DBOOST
_USE_WINDOWS_H /DWIN32_LEAN_AND_MEAN /D_WIN32_WINNT=0x0501 /DBOOST_THREAD_USE_LI
B /DBOOST_ALL_NO_LIB /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Z7
/MTd /c -I../vendor/boost.org/boost/1.45.0/include /Fobugshow/obj/win32/dbg/main.o
bugshow/main.cpp
Any ideas why link.exe will fail?
UPDATE:
When I add the folder where link.exe is located in my PATH and then calls link.exe without the path prefix, I get the following error instead:
LINK: fatal error LNK1181: cannot open input file 'link.exe'
link.exe ?!?!