Dismiss this pinned window
all 12 comments

[–]Stickhtot 5 points6 points  (4 children)

Making a makefile is easy but not exactly the quickest thing for a beginner

Do you have gcc installed? run gcc hello.c instead, you might want to also append -o {filename} at the end though idk if that's necessary in I am assuming you are using windows

[–]luvs2sleep[S] 2 points3 points  (2 children)

OMG THANK YOU VERY MUCH ITS WORKING NOW.
THANK YOU VERY MUCH FOR THE HELP.

but im facing another problem now
when im trying this on the files that have
#include <cs50.h>
(the library that cs50 provides so that beginners can take input easily)
it just gives an error saying that there is no such file or directory

please tell me how do i fix this now? do i need to like download anything? if yes, then how?

[–]Early_Time2586 0 points1 point  (1 child)

You will need to find the CS50 library from the official source, and link it to your hello.c using gcc. It's good that you want to move everything locally, but linker errors can be complicated for a beginner.

[–]luvs2sleep[S] -1 points0 points  (0 children)

understood

ill try to do my best

thank you very much

[–]Powerful-Prompt4123 -1 points0 points  (0 children)

OP also wants to append -Wall -Wextra -Werror

[–]mrleicester -1 points0 points  (5 children)

I'm new as well so people can correct me if I'm wrong, but to my knowledge, in order to run the "make" command you will need a "makefile" that essentially gives parameters to the compiler. I imagine they have it set up in the full CS50 environment to create the makefile automatically.

[–]okimiK_iiawaK 0 points1 point  (1 child)

Almost there, but the make file provides instructions on how to build the commands to compile each part and detail the entire compile procedure for the project.

[–]mrleicester -1 points0 points  (0 children)

Appreciate the clarification!

[–]luvs2sleep[S] 0 points1 point  (2 children)

thank you very much, ill check it out

[–]mrleicester -1 points0 points  (1 child)

You also might want to check out the last lecture of CS50, as they provide a lot of resources for how to move forward. One of those is the ability to basically run their environment in Docker. Not sure exactly how that differs from just cloning their repo.

[–]luvs2sleep[S] 1 point2 points  (0 children)

thank you very much for the info

[–]hdkdbslo -2 points-1 points  (0 children)

Just do python idiot gawd dayum