News:

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

cannot open file : windows.inc

Started by tinkywinky, September 22, 2005, 02:49:15 AM

Previous topic - Next topic

tinkywinky

Hi, I'm a beginner of MASM32
I don't know how to start using MASM32
so I found a code in the Old masmforum which is written by GreenFade:

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

.data

Caption  db "Hi!",0
Text       db "Hi fellows!",0

.code
start:
invoke MessageBox, NULL, addr Text, addr Caption, MB_OK
invoke ExitProcess, NULL
end start

and I use console assemble and link
then, an error appeared and said
fatal A1000: cannot open file : windows.inc

where's the problem?
and where can I find a tutorial for MASM32
I'm so confused :'(
thank you.

hutch--

Hi Tinky,

Welcome on board. The code you are trying to use does not have any paths for the include files or libraries and with MASM32 at its default setup, you need that data so the assembler and linker can find the necessary files.

Try this out at the start of the file.


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

includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

tinkywinky

Thank you hutch :P, I think I'm getting to know MASM better :lol
btw, is that true that I can only save file in the masm folder else it won't work?
thanks again!

hutch--

tinky,

The only limitation wit the way MASM32 is set up is you must build your examples on the same drive as the installation as it uses pats that are relative to the root directory of the installed drive.

What I personally do is make an ASM directory away from the MASM32 instalation and just keep creating new directories as I need them. The ASM direcory is always on the same partition (drive).
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php