The MASM Forum

Projects => MASM32 => Topic started by: localhost on December 09, 2012, 02:36:43 AM

Title: Can't find any included file in \masm32\includes
Post by: localhost on December 09, 2012, 02:36:43 AM
I just installed masm32 on windows, all went weel, but any .asm that includes a file from \masm32 won't work.

C:\masmprojects>ml  /c  /Zd  /coff file.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

Assembling: file.asm
file.asm(5) : fatal error A1000: cannot open file : \masm32\includes\masm32rt.inc


file.asm

;inkb - dedndave

;--------------------------------------------------------------------------

      include \masm32\includes\masm32rt.inc

        .data

AscChar     db ?,13,10,0
WordCounter db ?

;--------------------------------------------------------------------------

        .code

start   proc
       
mov WordCounter, 0
print   chr$('Huo Codec - Copyright (c) 2012'),13,10
echo test

startLoop:
        add WordCounter, 1
call    crt__getch
add     al     , 2
mov     AscChar, al
invoke  StdOut , offset AscChar
;print   offset AscChar
;print   str$(offset AscChar)

invoke  locate, WordCounter, 1
cmp     al, 5
;cmp    AscChar, 'q'
;jz      endLoop
        ;je      endLoop
jne     startLoop
;jmp     startLoop

    ;INVOKE crt__getch
    ;.IF (eax == 0) || (eax == 0E0h)
    ;    INVOKE crt__getch
    ;.ENDIF


endLoop:

start   endp

end     start


I think something isn't configured correctly but I have no idea what it might be.
Title: Re: Can't find any included file in \masm32\includes
Post by: dedndave on December 09, 2012, 02:44:07 AM
the folder name does not end with an "s"
\masm32\includes\masm32rt.inc
\masm32\include\masm32rt.inc
Title: Re: Can't find any included file in \masm32\includes
Post by: localhost on December 09, 2012, 03:01:34 AM
Assembling: file.asm
file.asm(5) : fatal error A1000: cannot open file : \masm32\include\masm32rt.inc


Every where I look it uses that same path to include files, but it won't work for  me. I installed masm on drive D, so if I try to include D:\masm32\etc, it works, but then all .inc files include other files with \masm32 and I get the same error for each include.
Title: Re: Can't find any included file in \masm32\includes
Post by: dedndave on December 09, 2012, 03:10:08 AM
the masm32 folder should be installed in the root of whichever drive you are assembling from
and - the files you are building should be on the same drive

is that the case ?

it's ok to use a folder like this...
C:\masmprojects

but, the masm32 folder must then be
C:\masm32
Title: Re: Can't find any included file in \masm32\includes
Post by: Magnum on December 09, 2012, 03:10:56 AM
I am getting the same error.

I will look into it.

Andy
Title: Re: Can't find any included file in \masm32\includes
Post by: localhost on December 09, 2012, 03:11:28 AM
Quote from: dedndave on December 09, 2012, 03:10:08 AM
the masm32 folder should be installed in the root of whichever drive you are assembling from
and - the files you are building should be on the same drive

is that the case ?

Ah... that might be it.
Title: Re: Can't find any included file in \masm32\includes
Post by: localhost on December 09, 2012, 03:13:39 AM
Yes, that's the problem. I installed masm on drive D, but was trying to compile from drive C. Thank you!
Title: Re: Can't find any included file in \masm32\includes
Post by: Magnum on December 09, 2012, 03:13:44 AM
Did you do it with Console Build All ?

Andy
Title: Re: Can't find any included file in \masm32\includes
Post by: henryhuo on January 25, 2013, 06:36:52 PM
\masm32\include\masm32rt.inc


c:\ ?
d:\?
Title: Re: Can't find any included file in \masm32\includes
Post by: hutch-- on January 25, 2013, 07:53:18 PM
Guys, MASM32 is designed to only work on the partition it is installed on so that it does not interfere with other installations like C compilers, other assembler etc ....
Title: Re: Can't find any included file in \masm32\includes
Post by: dedndave on January 25, 2013, 11:51:12 PM
in other words, the project you are assembling must be on the same drive as the masm32 folder
and - it makes things easier if you installed the masm32 package into the root of that drive

let me see....
hotkey   :P
Title: Re: Can't find any included file in \masm32\includes
Post by: hutch-- on January 26, 2013, 02:19:16 AM
It will only install in the masm32 folder on the partition of your choice, if you then move it, it won't work as the paths will be incorrect.
Title: Re: Can't find any included file in \masm32\includes
Post by: Vortex on January 26, 2013, 06:35:36 AM
Hi localhost,

Moving the source files to the partition hosting the Masm32 installation is the best solution. If you wish to use different partitions :

set CurrDrive=%~d0

set CurrPath=%~p0

set FullPath=%CurrDrive%%CurrPath%

D:

cd \

\masm32\bin\ml /Fo%FullPath%WriteConsole.obj /c /coff %FullPath%WriteConsole.asm
\masm32\bin\polink /SUBSYSTEM:CONSOLE %FullPath%WriteConsole.obj /OUT:%FullPath%WriteConsole.exe

%CurrDrive%


Assumptions :

Source code -> C:\example ( or any other directory in C: )
Masm32 -> D:\masm32