implementation of selector for C, fixes in generator and compilation dependencies injection