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.
You have to install the package binutils
. It contains tool like an assembler ( gas
),the linker ( ld
) and other utilities to work with object/executable files.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.