I got the same error messages:

SHGetSpecialFolderPathA(NULL,path,CSIDL_MYDOCUMENTS,0); was not declared in the scope

and also CSIDL_MYDOCUMENTS was not declared in the scope.