News:

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

Fatal error A1000, LNK1181

Started by m987, March 01, 2012, 11:07:44 PM

Previous topic - Next topic

m987

Hi! I have a problem in masm program, I need help please. I´m trying to compile this, but when i link obj file appears this error "fatal error link181."  When I build all this appears "Fatal error A1000 cannot open file: Irvine.inc," also in the command prompt my obj and exe do not appear. I have windows 7 and 32 bit. I save the file with extension asm. Help please, Thank you.

TITLE Add and Subtract, Version 2                  (AddSub2.asm)
; This program adds and subtracts 32-bit unsigned
; integers and stores the sum in a variable.

INCLUDE Irvine32.inc

.data
val1 DWORD 10000h
val2 DWORD 40000h
val3 DWORD 20000h
finalVal DWORD ?

.code
main PROC
mov eax,val1     ; start with 10000h
add eax,val2     ; add 40000h
sub eax,val3     ; subtract 20000h
mov finalVal,eax ; store the result (30000h)
call DumpRegs    ; display the registers
exit
main ENDP
END main

dedndave

it cannot locate the Irvine32.inc file
try this
        INCLUDE  \SomeFolder\Irvine32.inc
change "SomeFolder" to match your location of the INC file

if you are reading Kip's book, you may want to struggle through getting the Irvine library to work
otherwise, install the masm32 package and save yourself some trouble

http://masm32.com/masmdl.htm

m987

I already install the masm32 package, i do not know why i am still having that problem. Thank you, maybe i set up masm32 wrong i will double check it

dedndave

no - Irvine32.inc/lib are not part of the masm32 package   :P

masm32 does not have a DumpRegs function, that i am aware of
but, try this...
        INCLUDE masm32\include\masm32rt.inc

        .data

val1     DWORD 10000h
val2     DWORD 40000h
val3     DWORD 20000h
finalVal DWORD ?

        .code

main    PROC

        mov     eax,val1     ; start with 10000h
        add     eax,val2     ; add 40000h
        sub     eax,val3     ; subtract 20000h
        mov     finalVal,eax ; store the result (30000h)

        print   uhex$(eax),'h',13,10
        inkey

        exit

main    ENDP

        END     main

dedndave

a while back, i wrote a DumpRegs function and some other dump proc's...
some are passed parameters in register
i need to re-write them to use INVOKE   :P

dedndave

here is the whole project
it is an adaptation of one of Paul Carter's book lessons
i wrote it for a friend that was interested in learning assembler
he didn't want to use the masm32 library functions and macros and i couldn't get Paul's stuff to build - lol

m987


jj2007

Quote from: dedndave on March 02, 2012, 12:48:19 AM
no - Irvine32.inc/lib are not part of the masm32 package   :P

Just in case Dave's project doesn't do what you need, here is a library that combines the Irvine and Masm32 packages, i.e. you can use the macros of both packages with it.