Reputation: 131
I am trying to create executable file though following code,
exe.x : obj.o
ld -o exe.x obj.o
obj.o : a01.asm
nasm -f win64 -o obj.o -l list.l a01.asm
When I run this file via "make" command in terminal it only gives object file and list file, then stop and shows make ld: Command not found and suggest "sudo apt install ld", but this also gives me error "Unable to locate package ld" . I use latest version of Ubuntu.
Upvotes: 5
Views: 5679
Reputation: 3583
You have to install the package binutils
.
It contains tools like an assembler (gas
),the linker (ld
) and other utilities like objdump
to work with object/executable files.
Upvotes: 8