Is it possible to compile c code by specifying dll libraries while compiling and linking using GCC or MinGW compiler ?

Thanks