News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Having issues assembling in MASM

Started by Samishii23, September 09, 2010, 02:25:19 PM

Previous topic - Next topic

Samishii23

Hello, I'm fresh off the internet bus.
I've been reading up on Iczelion's Asm tutorials, and I have downloaded and installed MASM32, but for some reason even the pre-written files won't Link to be made to exe format...

I'm refering to the copy and paste of the generic window code, and really all code...
When I go to the menu: Project ->Assemble & Link option... I get:
Assembling: C:\...\...\WIN.asm
(Microsoft Copyrights)
LINK : fatal error LNK1181: cannot open input file "C:\...\...\WIN.obj"
Link error


Link to the code: http://win32assembly.online.fr/tut3.html... Plus theres a zip with the asm file, a make file, exe, and obj file. I removed the exe file. But when I try the Assemble & Link option, it deletes the .obj file then errors.

What could I be doing wrong?

clive

Perhaps you want ".." as "..." is not valid.
It could be a random act of randomness. Those happen a lot as well.

Tedd

Presumably the '...' is his own ellipsis to avoid writing out the full path.


The problem is more likely to be the masm installation than the code itself.
The most common problem is that there's a space in the path, which gets split off when the parameters are passed to the batch file.

Try this, and report back what you get (complete with full pathnames, error messages, etc):
- unzip tut3.zip into a folder
- delete all files except the .asm
- Project -> Assemble
- if that worked, Project -> Link
No snowflake in an avalanche feels responsible.

Samishii23

Thanks for the fast replys.

I run Windows XP, and had all the files either on my desktop or My Docs folder.
Since you said something about the spaces in the file name. I've moved the files.

Assembled "WIN.asm":
Assembling: D:\~Projects~\ASM\WIN.asm
Volume in drive D has no label.
Volume Serial Number is 407C-AA0B

Directory of D:\~Projects~\ASM

Update:
I have since moved all the files into C:\ drive with no spaces, and the problem still occurs.
07/10/2001  07:52 AM             1,987 WIN.ASM
               1 File(s)          1,987 bytes
               0 Dir(s)  74,512,506,880 bytes free


Link obj file:
(Microsoft Copyright)

LINK : fatal error LNK1181: cannot open input file "D:\~Projects~\ASM\WIN.obj"
( drive information 74gb free )


Update:
I have since moved all the asm files to C:\ drive and theres no spaces in the file path. Still no change.

Samishii23

Slight update...
In the MASM menu, I used Code ->Create New GUI Application... After it made all the files and what not, it assembled fine. Exe works fine.

When I open up the same project in MASM32 it still gives the same above error when trying to link the obj file. :'(
But when compiled from a batch file that was generated from the Wizard, it'll compile fine.  :'(

Tedd

Strange.

Completely remove the masm32 package and install fresh.
Then try building a plain asm file from a folder with a simple name (no spaces, no symbols, just alphabetic characters) on the base of the same drive masm32 installed to.
No snowflake in an avalanche feels responsible.

Samishii23

Install: C:\masm32\
File: C:\Projects\WIN.asm
Screenshot: Project -> Assemble ASM File & Project -> Link OBJ File

Error: LNK1181: Cannot open input file "C:\Projects\WIN.obj"  :'(

Files in ZIP:
- WIN.asm
- ScreenShot of Assemble and Link windows

clive

It does not appear to be completing the ML (MASM) portion, and consequently it does not generate an .OBJ for the Linker to work with. Try actually running MASM from the command line.
It could be a random act of randomness. Those happen a lot as well.

Samishii23

Uh... Where would I go to learn how to do that?

hutch--

A number of things.

1. Ensure your OS/AV software is not interfering with the installation and that the installation completes correctly.
2. Verify that the install is working correctly by building some of its examples from the default editor.
3. Ensure that any code you are trying to build uses VALID PATHS for the assembler, linker and resource compiler.

If you are still having problems show us a small sample of the code you are trying to build.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Samishii23

Alrighty then... Um, I'm not sure if this is how most programmers do this...  :boohoo:
But as I am new, I'll just therefore declare my n00bness, and say what i'm doing now...
Ok I think I found what I was doing wrong. Stuff is compiling now...

At first I did the Create EXE makeit.bat and that did the batch file which compiled it fine. ( which what I was about to post about )
Then I looked under the Project menu again, and after seeing the batch console make... I tried the menu option Console Assemble & Link... Which then proceeded to make the exe fine... ( after running  the program to check to see if it worked, I had to shut up SUPERAntiSpyware from stoping the exe... )

Sorry about all the hassle guys, and thanks for trying to help me!
Hopefully my next set of posts will be regarding actually programming! :8)