hi, i am using slackware linux, i am trying to compile this basic program, but i cannot start the executable when i compile it, it has something to do with linking the sdl2 library but i am new to this, not sure how to procede
my file (sdl.asm) is:
section .text
extern SDL_Init
global _start
_start:
mov rdi, 0x20
call SDL_Init
xor eax, eax
add al, 0x3C
syscall
so i'm trying to compile this basic code with
nasm -f elf64 sdl.asm -o sdl.o
ld sdl.o -o sdl -lSDL2
but when i start the file i get
bash: ./sdl: No such file or directory
"file sdl" gets me:
sdl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld64.so.1, not stripped