0

Goal

When I run the command: gcc -ggdb -std=c99 -Wall -Werror hello.c -lcs50 -o test.exe from the root directory I am able to build the test.exe file and when I run test.exe all is well (thanks to this post by Manohar Reddy Poreddy)

However all of those flags are a little bit cumbersome and I think it would great to condense them into a 'make' command or similar. How would I do this on windows?

Context

GCC, G++ and GDB all seem to be correctly linked (I used chocolatey which paths everything automatically)

Lauro235
  • 121
  • 1
  • 8

1 Answers1

0

Okay so I found what I was looking for.

I hope this answer can help others. Turns out the utility is called 'make' (no surprises). In your directory you essentially create a 'makefile' where you can include your command line arguments which saves on repeated typing in the command line for each compile.

Here is an excellent response on how to install 'make' for windows and was perfect for my use case as a Chocolatey user.

I also found this resource which helps newcomers begin to get their head round GCC which I highly recommend if you're coming into this like I was and felt completely out of your depth.

Lauro235
  • 121
  • 1
  • 8