问题
Starting a new big C multiplatform project, what rules should one follow to avoid difficulties later? For example, as a new developer, I can have difficulties to navigate myself around Linux Kernel source code - which is a good example of highly evolvable but hard-to-step-in software structure with incosistent directory structure (e.g. sound directory and arch in the same directory level).
As a project-architect, what should I do to avoid later traps? Of course, I need very intuitive and self-consistent naming convention for C lexems and files. But what is the good style and what is not? Should I have one-only directory or tens of them? Should I place all header files in a common include directory?
Can you please give me a reference to a very good example? (any open source C project)
回答1:
You can probably refer to OpenSSL. Their file organization and distribution of functionalities across files is very good. So is their file naming convention which clearly indicates the functionalities. But, since it is based on SSL code, it might take some time to understand. Good Luck to you for your project! : )
来源:https://stackoverflow.com/questions/2410243/c-starting-a-big-project-file-directory-structure-and-names-good-example-req