Corrected some files to compile with Mingw c++

-W,l is not a valid option.
G++ compiler doesn't allow implicit cast to void * (-fpermissive).