News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Compiler errors

Started by Camper, June 09, 2017, 10:32:13 PM

Previous topic - Next topic

Camper

Hi,

I keep getting these compiler errors. Trying to compile various programs.
Am I doing something obviously wrong?

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

D:\Patches\MASM\EnumSoundcards>SET FILE=EnumSoundcards

D:\Patches\MASM\EnumSoundcards>SET PATH=C:\masm32\bin\

D:\Patches\MASM\EnumSoundcards>
D:\Patches\MASM\EnumSoundcards>@echo off
directx4.wav
if not exist rsrc.rc goto delexe
%PATH%Rc.exe /v rsrc.rc
Microsoft (R) Windows (R) Resource Compiler, Version 5.00.1823.1 - Build 1823
Copyright (C) Microsoft Corp. 1985-1998. All rights reserved.

Using codepage 1252 as default
Creating rsrc.RES
RC: RCPP -CP 1252 -f D:\Patches\MASM\EnumSoundcards\RCa02432 -g D:\Patches\MASM\
EnumSoundcards\RDa02432 -DRC_INVOKED -D_WIN32 -pc\:/ -E -I. -I .
rsrc.rc(1) : fatal error RC1015: cannot open include file '\masm32\INCLUDE\RESOU
RCE.H'.
%PATH%Cvtres.exe /machine:ix86 rsrc.res
Microsoft (R) Windows Resource To Object Converter Version 5.00.1736.1
Copyright (C) Microsoft Corp. 1992-1997. All rights reserved.

CVTRES : fatal error CVT1101: cannot open rsrc.res for reading

:delexe
if exist %FILE%.exe del %FILE%.exe

%PATH%Ml.exe /c /coff %FILE%.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

Assembling: EnumSoundcards.asm
EnumSoundcards.asm(6) : fatal error A1000: cannot open file : \masm32\include\wi
ndows.inc
if errorlevel 1 goto errorasm

if not exist rsrc.obj goto nores

%PATH%Link.exe /SUBSYSTEM:WINDOWS %FILE%.obj rsrc.obj
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : fatal error LNK1181: cannot open input file "EnumSoundcards.obj"
if errorlevel 1 goto errorlink

if exist %FILE%.obj del %FILE%.obj
if exist rsrc.obj del rsrc.obj
if exist rsrc.res del rsrc.res

dir %FILE%.*
Volume in drive D is Programs
Volume Serial Number is B6A8-69A5

Directory of D:\Patches\MASM\EnumSoundcards

04-06-2017  18:28            12.461 EnumSoundcards.Asm
               1 File(s)         12.461 bytes
               0 Dir(s)  266.375.909.376 bytes free
goto Show

:nores
%PATH%Link.exe /SUBSYSTEM:WINDOWS %FILE%.obj
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : fatal error LNK1181: cannot open input file "EnumSoundcards.obj"
if errorlevel 1 goto errorlink

if exist %FILE%.obj del %FILE%.obj

dir %FILE%.*
Volume in drive D is Programs
Volume Serial Number is B6A8-69A5

Directory of D:\Patches\MASM\EnumSoundcards

04-06-2017  18:28            12.461 EnumSoundcards.Asm
               1 File(s)         12.461 bytes
               0 Dir(s)  266.375.909.376 bytes free
goto Show

:errorlink
echo _
_
echo Link error
Link error
goto Done

:errorasm
echo _
_
echo Assembly Error
Assembly Error
goto Done

:Show
%FILE%.exe
'EnumSoundcards.exe' is not recognized as an internal or external command,
operable program or batch file.
:Done
pause
Press any key to continue . . .


/////////////////////////////////////////////Batch File

SET FILE=EnumSoundcards
SET PATH=C:\masm32\bin\

@echo off

if not exist rsrc.rc goto delexe
%PATH%Rc.exe /v rsrc.rc
%PATH%Cvtres.exe /machine:ix86 rsrc.res

:delexe
if exist %FILE%.exe del %FILE%.exe

%PATH%Ml.exe /c /coff %FILE%.asm
if errorlevel 1 goto errorasm

if not exist rsrc.obj goto nores

%PATH%Link.exe /SUBSYSTEM:WINDOWS %FILE%.obj rsrc.obj
if errorlevel 1 goto errorlink

if exist %FILE%.obj del %FILE%.obj
if exist rsrc.obj del rsrc.obj
if exist rsrc.res del rsrc.res

dir %FILE%.*
goto Show

:nores
%PATH%Link.exe /SUBSYSTEM:WINDOWS %FILE%.obj
if errorlevel 1 goto errorlink

if exist %FILE%.obj del %FILE%.obj

dir %FILE%.*
goto Show

:errorlink
echo _
echo Link error
goto Done

:errorasm
echo _
echo Assembly Error
goto Done

:Show
%FILE%.exe
:Done
pause



The masm32 install is at my C: drive "consequently" and the program folder is still on my D: drive. Is this an issue?

Regards,

jj2007

Quote from: Skupje on June 09, 2017, 10:32:13 PMIs this an issue?

YES :biggrin:

(there are good reasons why we all use include \masm32\include\masm32rt.inc and not include C:\masm32\include\masm32rt.inc)

HSE

Hi Skupje!

You are working in D: and Masm32 is in C:

For to make things easy you need to work in C:, or copy masm32 to D: (just copy and paste the directory)

In you avatar I see there is a human behind you, you can ask him.
Equations in Assembly: SmplMath

felipe

Quote from: HSE on June 09, 2017, 11:13:46 PM
In you avatar I see there is a human behind you, you can ask him.

:icon_mrgreen: