Correction : The user have to give the path to the MinGW64 lib .a file even if its in the MinGW64 standard lib directory . Thats very user unfriendly and i reported this mex behaviour to the mingw64 developers
Here is the correct command (please note that for VS2017 compiler only -l libname is enough !)
mex -v c:\ProgramData\MATLAB\SupportPackages\R2018a\3P.instrset\mingw_w64.instrset\x86_64-w64-mingw32\lib\libiphlpapi.a MACAddress_mex.c
Best Answer