2 months ago, I mentioned compiling C projects with custom library, such as genlib, simpio and strlib by including the .h header files and .c implementation files in the compilation folder. However, I made a mistake (not mistake actually, but a boob). It’s obviously not an efficient way to copy all .h and .c files in the compilation folder for each project, unless you wanna make it portable.
Fortunately, I found a better way to have fun with custom library.
In the meantime, I am still using GUI IDE for C programming (Code::Blocks) instead of using command line and scripts. Therefore, this “better way" is to tell the compiler (of Code::Blocks) (Not writing a script) where is the library located.
Just 3 steps and it’s done. You can now and ever use the common custom library for all C projects and do not need to copying them into each project folder every time.