Hello. I'm trying to create this simple code.
.386
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
.data
.code
start:
invoke ExitProcess,0
end start
I save this in E:\My MASM32 Projects\ and when I choose "Build all" I get
Assembling E:\My.asm
MASM : fatal error A1000: cannot open file : E:\My.asm
Assembly Error
But when I save the file as E:\My.asm it works. Why is this so?
Thank you
"E:\My MASM32 Projects\ " - that's what you say!
so if the assemler look for my.asm in E:\ ,there's no way to find it.
I dont know if you'd understand the next one at this level of experience,but i'll recomend you a better way for command line compiling :
from batch file:
set PATH="the bin path of ml.exe ,link exe,e.t.c";%PATH%
set INCLUDE="the \include direcory";%INCLUDE%
set LIB="the \lib directory"%LIB%
and your paths are set to the environment variables.
below in the file you can set the compiler/linker options and after you put the batch file in your project's dir,you can compile it without any problem.
And if you do it like that there's no need to set the path with the include directive i.e.:
include windows.h
...
includelib user32.lib - that's enough
lost-member,
The trick is to build your projects in a directory that DOES NOT have spaces in the names. ML is a bit ancient here. I personally build my projects on the same partition as the MASM32 installation but in a number of directories off the root dir "asm", "asm1", "asm2" etc .... Each "asm?" directory has as many subdirectories off it as fit on the screen in File Manager.
I put a "PROJECTS" directory in the MASM32 one. Keeps everything neat and related, since I've got upward of 6 different compilers/assemblers on my system :bg
Yeah I have one called "-apps", so it's located at the top of the directory tree. The hyphen doesn't affect it and it still works (no space).