C - Starting a big project. File/Directory structure and names. Good example required [closed]

安稳与你 提交于 2020-01-01 02:51:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!