Are you including the right header-file? Since it's a "Unicode/Ansi" function, it will have a macro somewhere that translates it to GetUserNameExA or GetUserNameExW for the Ansi and Unicode versions respectively. It looks like your linker is not looking for a A/W version of the function, which makes me think that you are not using the correct headerfile - but I'm only guessing.
From:Originally Posted by MSDN
http://msdn2.microsoft.com/en-us/library/ms724435.aspx
--
Mats