mciSendString is a component of the Windows API and is not inherently portable.
I would recommend looking into the libSndFile and RtAudio libraries for playing sound files. They're both portable across Windows, Mac OS, and Linuxes, and I have used them both in the past with good results.