Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
d0mnik opened this issue May 3, 2023 · 0 comments
Open

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

d0mnik opened this issue May 3, 2023 · 0 comments

Comments

@d0mnik
Copy link

d0mnik commented May 3, 2023

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

Repository owner deleted a comment from piper4hire Jul 20, 2023
Repository owner deleted a comment from d0mnik Jul 20, 2023
Repository owner deleted a comment from piper4hire Jul 20, 2023
Repository owner deleted a comment from d0mnik Jul 20, 2023
Repository owner deleted a comment from piper4hire Jul 20, 2023
Repository owner deleted a comment from d0mnik Jul 20, 2023
Repository owner deleted a comment from piper4hire Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@d0mnik and others