This is my makefile:
task0 : main.o numbers.o add.o
gcc -m32 -g -Wall -o task0 main.o numbers.o add.o
main.o : main.c
gcc -g -Wall -m32 -ansi -c -o main.c
numbers.o : numbers.c
gcc -g -Wall -m32 -ansi -c -o numbers.c
add.o: add.s
nasm -g -f elf -w+all -o add.o add.s
clean :
rm -f *.o task0
And this is the terminal output:
gcc -m32 -g -Wall -o task0 main.o numbers.o add.o
Output:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
make: *** [task0] 1 הלקת
What is lgcc and how can I fix that?
gcc-multilib
package – Jimmie