The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: lost-member on December 21, 2005, 09:20:03 PM

Title: Path error - I think
Post by: lost-member on December 21, 2005, 09:20:03 PM
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

Title: Re: Path error - I think
Post by: Mincho Georgiev on December 21, 2005, 09:48:01 PM
"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






Title: Re: Path error - I think
Post by: hutch-- on December 22, 2005, 12:11:49 AM
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.
Title: Re: Path error - I think
Post by: zooba on December 22, 2005, 04:00:23 AM
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
Title: Re: Path error - I think
Post by: brixton on December 23, 2005, 04:30:27 PM
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).