News:

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

masm32 linker problem

Started by Fatboy, December 24, 2004, 07:38:18 PM

Previous topic - Next topic

Fatboy

Problem with the masm32 linker.

I just wanted to test the masm32 assembler, my code couldn't be simpler:

dosseg
.model small
.stack 200h
.data
.code

start:
mov ax, 4c00h
int 21h
end start



This (called simple.asm) assembles fine, but f^*"s up on linking, I'll give you the compile log exactly as it appears in the command line:



c:\Secondary\masm32\BIN>ml simple.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.

Assembling: simple.asm
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/z2
"simple.obj"
"simple.exe"
NUL
LINK : warning LNK4044: unrecognised option "z2"; ignored
simple.obj : warning LNK4033: converting object format from OMF to COFF
simple.obj : warning LNK4078: multiple ".data" sections found with different attributes (C0220040)
LINK : fatal error LNK1181: cannot open input file "simple.exe"

c:\Secondary\masm23/BIN>






What did I do wrong?

hutch--

 :bg

Redefine the topic as masm linker USER problem. You are trying to link 16 bit code with a 32 bit linker. Get the linker fom the forum web site at the top of the page if you want to write 16 bit code. Otherwise write 32 bit code and use the linker in MASM32.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php


Fatboy