News:

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

Main Menu

Fatal error A1000

Started by Baroooo, November 22, 2024, 11:01:59 PM

Previous topic - Next topic

Baroooo

Hi folks, newbie here and need help setting up the assembler. I have tried 4 times each having the same problem:
C:\Users\Desktop\Random\masm64\examples\Console>"C:\masm64\bin\ml64.exe" console.asm
Microsoft (R) Macro Assembler (x64) Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Assembling: C:\Program
MASM : fatal error A1000:cannot open file : C:\Program

C:\Users\Desktop\Random\masm64\examples\Console>ml64 /?
Microsoft (R) Macro Assembler (x64) Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Assembling: C:\Program
MASM : fatal error A1000:cannot open file : C:\Program

Basically whatever I do, this error A1000 is coming, I have installed masm in default C drive and let the installer do its job. Before you say, I am 100% sure I have 64bit architecture considering I am on Windows11. I have tried assemblers suggested in the guide in this forum, alongwith different ml64.exe-s from VS Build Tools, and yet the problem remains. I am at my wits end, as the assembler is there, in my PATH, the ml64 command works and it is not related to the assembly file as even help "ml64 /?" gives the same damned error. There is no reason for C:/Program to be mentioned as neither my assembler nor my assembly file are there. So any help would be appreciated, I have searched the whole net and tried for 5 days straight, and this place is my last hope. If you guys need extra info, just tell me and if I am doing some sort of silly mistake for this weird error then apologies in advance.
Thanks

zedd151

Offhand it looks like some environment variables had been changed, either by yourself, or some other program that you use... given the error message shown.

Can you assemble any of the examples from in the \masm64\examples directory?

Here is a simple batch file, try this. Save this as a file called "makeit.bat" in the folder where your .asm file is located.
Change "/ENTRY:*******" to replace "*******" with the name of the entry point in your source code.
@echo off

set appname=console

del %appname%.obj
del %appname%.exe

\masm64\bin64\ml64.exe /c %appname%.asm

\masm64\bin64\link.exe /SUBSYSTEM:CONSOLE /MACHINE:X64 /ENTRY:******* /nologo %appname%.obj

dir %appname%.*

pause
Once you change the entry point, save the file and double-click it (the file makeit.bat)... it should assemble and link your source, if there are no errors of course.

This *should* work, if your project is on the same drive/partition as the masm64 SDK.
The masm64 SDK installation does not change any environmet paths.

PS you dont need to specify the Drive Letter, if it is in the root of a drive/partition, and your project is anywhere on the same drive/partition.

I just noticed after I posted...
Quote from: Baroooo on November 22, 2024, 11:01:59 PMC:\Users\Desktop\Random\masm64\

This is wrong. Masm64 should be in root of C: here, example --> "C:\masm64\...".  But again, you do not need to put drive/partition letter i.e.,  "C:" - in the command line, nor need to change any environment paths, if done this way.

The Masm64 and Masm32 SDKs were both designed to work that way, and how I use them as well.

Quote from: hutch--INSTALLATION:
You run this SFX file from the root directory of the partition you want to install the SDK on. What you must end up with is a directory straight off the root directory called "masm64". If you move the installation to any other location on the partition, it will NOT WORK. If you already have an installation of the SDK on the partition, slightly rename it as this SFX is not designed to overwrite an existing installation.
from here: https://masm32.com/board/index.php?msg=109948

Other members may chime in, that also use non standard (from the usual hutch--  way) path arrangements, with a different perspective than mine.
Ventanas diez es el mejor.  :azn:

TimoVJL

Why this site users still use /ENTRY, while they know how MS linker works with known startup function names ???
May the source be with you

Baroooo

Ok so certain stuff:
I used this post for setting up the masm (https://masm32.com/board/index.php?topic=10880.0).
Secondly I read the FileList.txt in the bin64 folder and followed the steps and extracted the requested files from the 7-Zip mentioned in the above link.
Thirdly, since Zed mentioned something about makeit.bat, I decided why not try to run the ones given in the Example folder, and this is what I got:

Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation.  All rights reserved.

Microsoft (R) Macro Assembler (x64) Version 14.29.30136.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Assembling: C:\Program
MASM : fatal error A1000:cannot open file : C:\Program
Microsoft (R) Incremental Linker Version 14.29.30136.0
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : fatal error LNK1104: cannot open file '\masm32\m64lib\m64lib.lib'
 Volume in drive C is Windows-SSD
 Volume Serial Number is 00DE-76DD

 Directory of C:\masm64\Examples\Simple\large_image

08-05-2022  11:07             4,805 largeimg.asm
08-05-2022  11:09             4,761 largeimg.obj
               2 File(s)          9,566 bytes
               0 Dir(s)  106,367,787,008 bytes free
Press any key to continue . . .

So thing is not only ml64 not working, there is problem with linker as well. However, there are certain points to note, a) The linker issue is not that serious, I can solve it on my own and b) The issue isnt the .asm file as I had shown you earlier, even "ml64 /?" doesnt work, or even "ml64" doesnt work.
As for the paths, it is certainly there, here:

C:\Windows\System32>where ml64                                                                                         
C:\masm64\bin64\ml64.exe                                                                                                                                                                                                                        C:\Windows\System32>where link                                                                                         
C:\masm64\bin64\link.exe                                                                                                                                                                                                                        C:\Windows\System32>   

So there is only one assembler and there are no conflicts as well. Absolute bonkers.

zedd151

Something in your environment variables is causing this it's seems. Do you have  any other programming environments installed on your computer?

I suspect that there is an environment variable named "bin64", "bin",  (or some other) that points to somewhere in "Program Files", or so it seems. If not, then I have no clue why you are having these issues, sorry. It seems that I cannot help you.




Ventanas diez es el mejor.  :azn:

Baroooo

Yes man, I have got a bunch of compilers like gcc plus python and java as well and some other languages also so :sad: . I just wanted to know that am I the only person facing this problem? Nobody seems to facing this and I think there is some problem with the Environment variables but thing is, theoretically it should work, the assembler is present, cmd can find it, it isnt even showing wrong code, it directly says A1000 or file not found, yet it absolutely is there. Complete sorcery.

BugCatcher

Click on MASM64 SDK Click on Masm64 beta version 2. Masm64 must be in your root directory c:\masm64 not c:\directory
Must download Visual Studio community to get ml64 and other files needed to run masm64

zedd151

@Baroooo,
Hi. I wouldn't know where to begin, to assist you in removing or modifying any entries in your "PATH" environment variable or others. Doing so, may cause issues with whatever program changed it, or other undesired effects. This problem is not as easy as I first thought it would be. I cannot assume any responsibility by advising you to change anything regarding the environment variables.

There might be someone here that can help you, so don't lose hope just yet.

@Bugcatcher, he has masm64 SDK and the binaries... that's not the issue. He has an environment variable "PATH" or other environment variable issue.
Ventanas diez es el mejor.  :azn:

fearless

https://www.rapidee.com/en/about

Can quickly see path and edit it and other environment variables

TimoVJL

Quote from: Baroooo on Today at 02:24:41 AMYes man, I have got a bunch of compilers like gcc plus python and java as well and some other languages also so :sad: . I just wanted to know that am I the only person facing this problem? Nobody seems to facing this and I think there is some problem with the Environment variables but thing is, theoretically it should work, the assembler is present, cmd can find it, it isnt even showing wrong code, it directly says A1000 or file not found, yet it absolutely is there. Complete sorcery.
using basic rules helps, like keep good care of enviroment variables like PATH,INCLUDE,LIB helps a lot.
masm32 design is problematic, but sometimes SUBST helps.
SUBST /D M:
SUBST M: C:\code
M:
PAUSE
May the source be with you