0

I have installed cs50.h to my usr/local/include folder and libcs50.a to the usr/local/include folder however neither clang nor gcc are able to find it, giving the error:

lib

include

hello.c:2:10: fatal error: 'cs50.h' file not found #include <cs50.h>

error message

I have added both folders to my $PATH environment variable.

enter image description here

The commands I am trying to build using are

clang -ggdb3 -O0 -std=c11 -Wall -Werror -o hello hello.c -lcs50 -lm

and

gcc -g hello.c -o hello -lcs50 -lm

I have searched for other stack overflow questions and answers around the web but am unable find anything. I have entered each of the commands in this link. Does anyone have any idea what could be wrong?

2
  • you can see the following link
    – MARS
    Aug 23 '17 at 22:12
  • Thanks, although I should have specified I have followed those instructions already. I will update my question. Aug 23 '17 at 22:16

You must log in to answer this question.

Browse other questions tagged .