ECS 36B Lecture Notes - Lecture 9: Include Directive, C Standard Library, Uptodate

57 views2 pages
Verified Note

Document Summary

Dividing files into multiple files helps with the organization of the overall project. More usable because different files become libraries. Need to break up the program between source files and header files. Main. c contains a series of function calls. Compiler does not see the difference in a header file or c file. If you include c file more than once, will have double declaration errors, that"s why we have . h. **when you rename a guard name in c lion, it won"t change it in the makefile** Have to remember to do this manually. This could become time-consuming when compiling a large file. If you have hundreds of files together. Could compile all the . c files into one . io file. Update rule: the rule you want to make it up-to-date. Makefiles by hand is hard to do. Instead, we are using cmake (c stands for cross-platform) Addexecutable line includes all source files, takes care of dependencies for you.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents