Hi all,

I am trying to pick up some Win32asm. I am doing the "hello world" first program (plz don't laugh ;) ) from http://www.thomasbleeker.nl/exagone/WIN32ASM/tutor12.html
I have adjusted his code to reflect my 'MASM' directory rather than his 'MASM32' dir. I got the required .inc and .lib files from another PC which has MASM32 v6 SP2 installed, and added them to the appropriate MASM folders.

When I follow his instructions I get the following error:

"first.obj : fatal error L1101: invalid object module"

Could anybody please tell me what's going wrong?

Thanks,
Bill Miller



Below are my program specs and complete console dump of command prompt error:

WinXP; MASM 6.15 and Link 5.63

My (User) Variables:
PATH=C:\MASM\BIN;C:\MASM\BINR;%PATH%
LIB=C:\MASM\LIB
INCLUDE=C:\MASM\INCLUDE
INIT=C:\MASM\INIT
HELPFILES=C:\MASM\HELP\*.HLP
ASMEX=C:\MASM\SAMPLES

NOTE: I do *NOT* have MASM32 installed. I got the .lib and .inc files from another computer.

kernel32.lib, user32.lib, kernel32.inc, user32.inc (MASM32 v6SP2)
windows.inc v1.25

Here's my cmd-prompt dump:
ps. when I leave out the '/subsystem:windows' it won't complain about that but the 'invalid object module error' remains.
C:\MASM\BIN>make
Microsoft (R) Macro Assembler Version 6.15.8803
Copyright (C) Microsoft Corp 1981-2000. All rights reserved.

Assembling: first.asm

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

LINK : warning L4017: /subsystem : unrecognized option name; option ignored
Run File :
List File :
Libraries [.lib]:
Definitions File :
first.obj : fatal error L1101: invalid object module
Object file offset: 1 Record type: 4c

C:\MASM\BIN>

---end of message---
Posted on 2001-10-20 20:45:30 by Nuffsaid
Hi Nuffsaid

My Link.exe is version 5.012.8078.0

Try getting this linker.

KetilO
Posted on 2001-10-20 21:07:17 by KetilO
Hi KetilO,

I tried it with the oldest version I could find for now (Masm 6.11):
Microsoft (R) Segmented Executable Linker Version 5.31.009 Jul 13 1992

Still same error. I should have a version 5.x of MASM archived somewhere.

Did it work for you? Could it be because you have MASM32 installed?

Thanks,

Bill Miller
Posted on 2001-10-20 21:37:24 by Nuffsaid
Microsoft (R) Macro Assembler Version 7.00.9254

Copyright (C) Microsoft Corporation. All rights reserved.

Assembling: first.asm
Microsoft (R) Incremental Linker Version 7.00.9254
Copyright (C) Microsoft Corporation. All rights reserved.

Make finished.
Sorry, I'm no help. :)
This is with:
ML /c /coff /Cp first.asm
LINK /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 first.obj
Posted on 2001-10-20 22:02:48 by bitRAKE
Hi Nuffsaid

Works well.

Microsoft (R) Macro Assembler Version 6.15.8803
Copyright (C) Microsoft Corp 1981-2000. All rights reserved.

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

Make finished.

I guess you should dl the masm32 pack.

I have also included a RadASM project of first.asm.

So bitRAKE, got hold of 7.0?

KetilO
Posted on 2001-10-20 22:46:48 by KetilO
MovingFulcrum sent me 7.0 a couple of months ago, but it was from VS.NET beta 1. I got beta 2 from the Dr. Dobbs mag. I've been going through the tuts - like C# so far. I'm kind of wondering how hard it'd be to create an custom MASM editor for VS.NET. It would be hypocricy, but that's way I'd like it. :)
Posted on 2001-10-20 23:35:02 by bitRAKE
Nuffsaid: your problem is the linker. You have the same linker as the one in the download section of win32asm.cjb.net, but this linker can only be used for linking DOS programs (afaik). So unless you have a good reason to not install the masm32 package, I really advice you to install it. It ensures that all (well most..) programs created with masm32 assemble correctly and it has a bunch of nice programs and examples too..

Thomas
Posted on 2001-10-21 04:02:02 by Thomas
YES!
Thanks all for replying. Like Thomas suggested, installing MASM32 fixed it for me. Dank je, gozer. :)

I'm happy. Regards,
Bill Miller
Posted on 2001-10-21 07:00:12 by Nuffsaid
Oh, and for the record...
KetilO was indeed the first to suggest d/l'ing MASM32. Credit where credit is due; I just got up and my brains are still loading up. ;)

Thnx,
Bill
Posted on 2001-10-21 07:07:09 by Nuffsaid