mex does not accept directory names as individual arguments: it thinks you are specifying files to be compiled and then complains when it cannot find the file extension.
It looks to me as if what you need is
mex('/mnt/D/D/ZJU Data/HDR/softwre/MatlabEXR/exrinfo.cpp', sprintf('-I"%s"', path1), sprintf('-L"%s"', path2))
In practice you could get away without the double quotes for these particular paths, but since directory names are permitted to include spaces and shell delimiter characters, it is safer to use them.
... though in theory you should use apostrophes instead of double-quotes, just in case the paths include some $ that might lead to unwanted shell variable interpolation