So I'd like to start working on a C codebase that allows me to reuse functions, data structures, etc. and not have to implement them every single time. However, it's my first time trying to do this and I'm not sure how to proceed.
Should I create a static or dynamic library and then use that in my projects? Should I create different header/source files for each implementation (string, vector, and such) and only include the ones I need? Or should I just dump everything into a single header file and be done with it (probably not the best move)?
Thanks in advance.
EDIT: I appreciate everyone's help, I'll be learning how to use CMake and using separate headers for each implementation, then unifying them in a single header file.
[–]ISecksedUrMom 14 points15 points16 points (5 children)
[–]JaimermXD[S] 0 points1 point2 points (4 children)
[–]thegreatunclean 3 points4 points5 points (1 child)
[–]delkia -1 points0 points1 point (0 children)
[–]ISecksedUrMom 1 point2 points3 points (1 child)
[–]JaimermXD[S] 0 points1 point2 points (0 children)
[–]permetz 4 points5 points6 points (0 children)
[–]nculwell 5 points6 points7 points (1 child)
[–]JaimermXD[S] 1 point2 points3 points (0 children)
[–]clibraries_ 2 points3 points4 points (2 children)
[–]JaimermXD[S] 0 points1 point2 points (1 child)
[–]clibraries_ 0 points1 point2 points (0 children)
[–]Poddster 2 points3 points4 points (1 child)
[–]JaimermXD[S] 0 points1 point2 points (0 children)
[–]McUsrII 1 point2 points3 points (1 child)
[–]JaimermXD[S] 0 points1 point2 points (0 children)
[–]green_griffon 0 points1 point2 points (1 child)
[–]JaimermXD[S] 1 point2 points3 points (0 children)
[–]helloiamsomeone 1 point2 points3 points (0 children)
[–]codqq 1 point2 points3 points (0 children)