0

When I try to compile my helpers.c file the compiler shows me

clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow helpers.c -lcrypt -lcs50 -lm -o helpers /usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../x86_64-linux-gnu/crt1.o: In function _start': (.text+0x20): undefined reference to main' clang-7: error: linker command failed with exit code 1 (use -v to see invocation) : recipe for target 'helpers' failed make: *** [helpers] Error 1

Even when I compile it with just the source code, it shows me this, I can't figure out how to solve this, can someone help?

1

In the pset we have several files, if you look closely at the specifications, there is a special file called makefile, and what we have to write to the compiler is:

make filter
| improve this answer | |
  • Yeah, I wasn't compiling filter which has the main function, instead, I was compiling helpers, which was giving me the error. Thanks :) – Khushi Rajpal Jul 6 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .