SASM icon indicating copy to clipboard operation
SASM copied to clipboard

Unable to link & call 32-bit Windows APIs using GAS Mode

Open d0mnik opened this issue 1 year ago • 0 comments

attempting to compile

.data
msg: .string "Hello"

.text
.global _main
.intel_syntax noprefix

.extern MessageBoxA

_main:
    # write your code here
    push offset msg
    push 0
    call MessageBoxA
    ret

returns the following error undefined reference to MessageBoxA, despite the following flags in COLLECT_GCC_OPTIONS: -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt c:/program files (x86)/sasm/mingw/bin/../lib/gcc/mingw32/4.6.2/crtend.o

d0mnik avatar May 03 '23 01:05 d0mnik