News:

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

First attempt at a win32 program

Started by Kyoy, January 13, 2006, 02:37:05 PM

Previous topic - Next topic

Kyoy

I am using Masm32. This is my first attempt at a win32 program. When i tried to follow a tutorial's instruction to assemble and link the codes using this

@echo off
ml /c /coff first.asm
link /subsystem:windows first.obj
pause>nul

- then saving it as make.bat and running it,
i got this error LINK : fatal error LNK1181: cannot open input file "first.obj"

I don't understand what i am doing wrong so can someone help me out? I included all the import libraries. I followed the tutorial right by the book. Can someone tell me what that error means? Thanks alot.

hutch--

Just run the ML command line by itself and see if you get any errors. If it does not build, you will get the link error you posted.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

P1

Kyoy,

Welcome A Board !!!     :U

Using 'Search' will help to learn more quickly by studying past answers.   Going through the Help files of QEditor in a great way to cover the basics.

Go into the BIN directory of MASM32, in there is the Build.Bat batch file for QEditor.

Study it for more techniques in using batch files to build/assemble your code.

Regards,  P1  :8)

Kyoy

Quote from: hutch-- on January 13, 2006, 03:13:02 PM
Just run the ML command line by itself and see if you get any errors. If it does not build, you will get the link error you posted.

Yes, the error is fatal error A1000 : cannot open file : first.asm

brixton

Make sure you're using only short filenames for folders in the tree!
If you love somebody, set them free.
If they return, they were always yours. If they don't, they never were..

Tedd

At the start of the batch file, make sure the current directory is the same as the one the .asm file is in.
Options are to either CD to it, or specify the full path for the filename(s)
No snowflake in an avalanche feels responsible.

P1

Kyoy,

In using MASM32, I found that keeping current projects in the MASM32 directory works the best in most cases.

i.e.  C:\MASM32\Test\Test.asm 

Regards,  Michael

zooba

Or a subdirectory of the MASM32 directory:

ie. C:\MASM32\PROJECTS\Test\test.asm

:U