Windows 10 MinGW GCC Compile a program to DLL

Hello all!
I would like to use this article HOWTO Create and Deploy a Sample DLL using MinGW | MinGW
but it's not clear for instance how to create DLL from C source using GCC instead of G++ that I will use in other languages programs on Windows. Could you provide any example?
Thank you.