From Iczelion Tutorial No.2.

.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib

.data
MsgBoxCaption db "Iczelion Tutorial No.2",0
MsgBoxText db "Win32 Assembly is Great!",0

.code
start:
invoke MessageBox, NULL, addr MsgBoxText, addr MsgBoxCaption, MB_OK
invoke ExitProcess, NULL
end start

When I type ml msgbox.asm I get
LINK : fatal error L1104: \masm32\lib\kernel32.lib : not valid library
if I comment it out I get
LINK : fatal error L1104: \masm32\lib\user32.lib : not valid library


I have tried it with the Lib I got from Hutch's down load and also the one from Readiosys but I still get the same message. I can assemble and run a Hello World but any includelib gets me these errors. Should I try getting it from MS? If so can anybody tell me which PSDK-FULL.<N>.cab has the Lib in it (or if this is what I want to get)? Any suggestions would be greatly appreciated.
Posted on 2001-10-28 09:43:34 by Steve
Strange. What OS do you run?

Do you have another version of LINK, maybe an older one that doesn't know about import libs?

Post your MAKE (or whatever) file.

:)

Oops, I see that you typed ML. You need some command line options. Take a look at the .BAT files that are in \MASM32\BIN. You'll need something like this:

\masm32\bin\ml /c /coff %1.asm
\masm32\bin\Link /SUBSYSTEM:WINDOWS %1.obj

Hope this helps. :)
Posted on 2001-10-28 16:31:20 by S/390
I have downloaded link from 3 dif places on the net in the past couple of weeks. I'm running win98. I guess I better learn about make files (don't know nutin' bout that :) I'll play around with your suggestions, Thanks.
Posted on 2001-10-28 17:07:47 by Steve
Tried command line args and got
msgbox.obj : fatal error L1101: invalid object module
Object file offset: 1 Record type: 4c


Am I supposed to perform some kind of manipulation of the LIB folder before I use it or is it ready to go once unzipped?:confused: Thanks
Posted on 2001-10-28 17:21:21 by Steve
The LIB folder should be good to go as is.

Sounds link you may have a LINK version problem. MASM32 ships with 5.12.8078 (I'm using 6.00.8447). You'll also need MSPDB50.DLL to go with it.

The /coff switch should generate the correct .OBJ format.

That's about all I can think of. :)
Posted on 2001-10-28 17:42:50 by S/390

msgbox.obj : fatal error L1101: invalid object module
Object file offset: 1 Record type: 4c

Sounds very much like you're assembling to OMF format... which is
bad :). "ml /c /coff blah.asm" is the basic cmdline for "correct" assembly.
Also, make sure you don't have a dog-old linker version somewhere
in your path that gets executed instead of the one from masm32..
Posted on 2001-10-29 00:11:59 by f0dder
Thanks for the help guys. I got it!
Posted on 2001-10-30 16:32:07 by Steve
Cool. And you're welcome.

Now you can start to have some real fun! :)
Posted on 2001-10-30 19:35:14 by S/390