I want to finally understand how to compile in C well, any resource recommendations?

gpl
2025-02-13T19:46:09Z

I am a scientist who has semi-frequently written code in C (and other compiled languages like Fortran). When it comes time to compile, I typically tape together a Makefile from past projects and hope for the best, but even then I spend more time than I'd like to admit trying to figure out why my project is not being compiled or linked correctly. I've had a hard time finding any resources that aren't extremely surface level, or else are not behind some type of paywall. Can anyone recommend me some reading so that I can confidently write Makefiles and compile programs and actually understand what the different flags and commands are doing? I don't need extreme "under the hood" information as I don't intend to do things like write my own compiler, I just want to understand the process a little better. Help a scientist out!

Comments URL: https://tildes.net/~comp/1lzc/i_want_to_finally_understand_how_to_compile_in_c_well_any_resource_recommendations

Votes: 15

Comments: 7