If I need to use the math library, I need to add -lm when I'm using GCC in Linux. But on Windows when I'm using GCC in MinGW-w64, I didn't use -lm and it works well.
I know the reason why it is necessary to link libm. But I don't really know why I can omit that in Windows?