News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Linker L1104 error

Started by gya, December 31, 2005, 05:40:35 PM

Previous topic - Next topic

gya

Hello everybody! Sorry for dummy question...
I've just install MASM32 and try to compile simplest example from /masm/example dir that is hello.asm
Doing so - linker failed with error. Here is the output:
------------------------------------------------------------------------------------------------------
H:\masm32\examples\EXAMPL10\CONSOLE\HELLO>ml /Zi HELLO.ASM
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

Object Modules [.obj]: HELLO.obj /CO:nopack
Run File [HELLO.exe]: "HELLO.exe"
List File [nul.map]: NUL
Libraries [.lib]:
Definitions File [nul.def]:
LINK : fatal error L1104: \masm32\lib\masm32.lib : not valid libray
--------------------------------------------------------------------------------------------------------

Help me pls.
What i'm doing wrong?
Many Thanks in advance!

asmlover

Try to run makelibs  batch  file in MASM32 directory to rebuild  lib files (should to start once after installation). Hope it helps you.
Happy new year, anyway!.

MichaelW

Hello gya, welcome to the forum.

Could you post the command lines that you are using to assemble and link? I think the problem is likely to be there, but none of the command lines I tried would trigger this particular error.


eschew obfuscation

gya

Yes, by the way Happy New Year to everyone and thanks for this forum  :U
I was following tutorial from http://www.intelligent-systems.info/classes/ee360/tutorial.htm

So  due to paragraph 8:
8.     Compile and link the assembly file by issuing "ml /Zi example1.asm"

Here is the output:
--------------------------------------------------------------------------------------------------
H:\masm32\examples\EXAMPL10\CONSOLE\HELLO>dir
Volume in drive H is ExtraVol
Volume Serial Number is 5C16-0845

Directory of H:\masm32\examples\EXAMPL10\CONSOLE\HELLO

31/12/2005  19:50    <DIR>          .
31/12/2005  19:50    <DIR>          ..
14/12/2003  02:57               902 HELLO.ASM
               1 File(s)            902 bytes
               2 Dir(s)  82,396,643,328 bytes free

H:\masm32\examples\EXAMPL10\CONSOLE\HELLO>ml /Zi HELLO.ASM
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

Assembling: HELLO.ASM

Microsoft (R) Segmented Executable Linker  Version 5.60.339 Dec  5 1994
Copyright (C) Microsoft Corp 1984-1993.  All rights reserved.

Object Modules [.obj]: HELLO.obj /CO:nopack
Run File [HELLO.exe]: "HELLO.exe"
List File [nul.map]: NUL
Libraries [.lib]:
Definitions File [nul.def]:
LINK : fatal error L1104: \masm32\lib\masm32.lib : not valid library

H:\masm32\examples\EXAMPL10\CONSOLE\HELLO>
--------------------------------------------------------------------------------------------------------------

I'm lost...
Everything is going wrong from the very beginning...   :(

MichaelW

Not everything is going wrong, just a few crucial things :bg

For the MASM32 examples try assembling and linking with a batch file like this:

\masm32\bin\ml /c /coff hello.asm
pause
\masm32\bin\Link /SUBSYSTEM:CONSOLE /OPT:NOREF hello.obj
pause
hello
pause


You need to assemble and link in two separate steps, using the correct options. For the MASM32 examples you probably could have bypassed these problems by just building the app from within the Quick Editor that came with MASM32.

Also, linker version 5.60.339 will not work for the MASM32 examples or any code that uses the MASM32 library because it is a 16-bit linker.

eschew obfuscation

gya

Thanks a'lot, it works!
Now i can start digging...
I understand my mistake - i was replacing 32linker with 16linker. Thanks for help!
One more question - is there is any profound manpages on linker and ml?

Thanks  :dance:

MichaelW

The MASM 6.11 Reference and Programmer's Guides are available here:

http://webster.cs.ucr.edu/Page_TechDocs/index.html

Information on the ML and Link command lines can be found in chapter 1 of the Reference Guide:

http://webster.cs.ucr.edu/Page_TechDocs/MASMDoc/ReferenceGuide/Chap_01.htm

eschew obfuscation

gya