0

I need some help with my C file. Here is my code:

#include <unistd.h>

void    ft_putchar(char c)
{
    write(1, &c, 1);
}

I compiled it with gcc -Wall -Wextra -Werror ft_putchar.c

Here is the error message:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Same
  • 1
  • 1

0 Answers0