Could somebody show me how to write code that wouldnt require linking libraries? I can't have them at school because they take up too much space... Also I'd just like to be more familiar with the assembly process. Before the only way I could compile was to open up qeditor.exe and press 'build'. I don't want to have to do that..

For example:

.model flat, stdcall
option casemap:none
include \masm\include\
include \masm\include\
ExitProcess PROTO :DWORD
push 0
call ExitProcess
end start

ml /c /coff test1.asm
ml /subsystem:windows test1.obj

Gives the link error, ' unresolved external symbol _ExitProcess@4'.
What am I doing wrong? It must think I want to use my own ExitProcess...

Posted on 2001-11-26 23:34:31 by matthew
if you look through '' you will find it already has the definition 'ExitProcess PROTO :DWORD'.

You actualy do need these librarys to link a program as these contain the information used to create the import information for the Dll's or I dont have a clue how to work around not having them.

Most basic programs, should only require Kernel32.lib User32.lib and Gdi32.lib, so you really dont need all of the other ones.
Posted on 2001-11-27 01:54:29 by huh
matthew, you should get the libraries from the latest platformsdk,
they use the *new* import library format which is substantially
smaller than the old import format (reason is sorta technicaly, but
it's well described somewhere in msdn :)).

If you really *CANT* have the import libraries with you, you'll probably
have to switch to one of those wacky assemblers ;).
Posted on 2001-11-27 10:17:35 by f0dder
As huh said, you only need a few .LIBs for most basic progs.

Do you have access to a CD recorder? You could put everything on CD, and change the INCLUDELIBs to point to the CD. :)
Posted on 2001-11-27 13:22:37 by S/390
Instead of changing "include" and "includelib", just use the base
filename instead of any directory paths, and set up your INCLUDE
and LIB environment variables properly. That way you can make
your source build <whereever>.
Posted on 2001-11-27 13:24:33 by f0dder
Yup, or you could use the command line options on ML and LINK, in case another "language" uses the same env vars. This is what I did. I have one .BAT file at home that uses C: and another at work that uses U:, my network drive.

I didn't want to confuse the lad... :)
Posted on 2001-11-27 14:33:20 by S/390
I added an example in version 7 that shows an alternative way to build projects. Set environment variables in a batch file, build a response file for assembly, build the resource file, build another response file for linking, link with the RES file directly in the link line.

None of it is hard to do.

The file is ALTBUILD.ASM in the example code.

Posted on 2001-11-27 15:23:11 by hutch--
I have actually thought of burning the whole thing to cd... since I have my own burner (2x w00t) it won't be difficult. Finding some media to burn too could be tougher ;)

I just got masm32v7 and it's great, i'll just burn it to the cd.. after checking batch files for drive letter refrences.
Posted on 2001-11-27 18:20:58 by matthew