Build the Library as static and Code::Blocks will link it as static, if given the right options; this assumes the compiler you are using supports static (I think all compilers support static, but might be wrong).
Note, Code::Blocks plug-ins are required to not be static by design; else, you could not enable/disable at run-time.
Tim S