The error message suggests the function is not prototyped. I've never used the function, but if you look in the header...
Code:
#if (_WIN32_IE >= 0x0400)
SHSTDAPI_(void) SHFlushSFCache(void);
SHSTDAPI_(LPITEMIDLIST) SHCloneSpecialIDList(HWND hwnd, int csidl, BOOL fCreate);
SHSTDAPI_(BOOL) SHGetSpecialFolderPathA(HWND hwnd, LPSTR pszPath, int csidl, BOOL fCreate);
SHSTDAPI_(BOOL) SHGetSpecialFolderPathW(HWND hwnd, LPWSTR pszPath, int csidl, BOOL fCreate);
#ifdef UNICODE
#define SHGetSpecialFolderPath SHGetSpecialFolderPathW
#else
#define SHGetSpecialFolderPath SHGetSpecialFolderPathA
#endif // !UNICODE
#if (_WIN32_IE >= 0x0500)
typedef enum {
SHGFP_TYPE_CURRENT = 0, // current value for user, verify it exists
SHGFP_TYPE_DEFAULT = 1, // default value, may not exist
} SHGFP_TYPE;
SHFOLDERAPI SHGetFolderPathA(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPSTR pszPath);
SHFOLDERAPI SHGetFolderPathW(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
#ifdef UNICODE
#define SHGetFolderPath SHGetFolderPathW
#else
#define SHGetFolderPath SHGetFolderPathA
#endif // !UNICODE
SHSTDAPI SHGetFolderLocation(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPITEMIDLIST *ppidl);
SHFOLDERAPI SHGetFolderPathAndSubDirA(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPCSTR pszSubDir, LPSTR pszPath);
SHFOLDERAPI SHGetFolderPathAndSubDirW(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPCWSTR pszSubDir, LPWSTR pszPath);
#ifdef UNICODE
#define SHGetFolderPathAndSubDir SHGetFolderPathAndSubDirW
#else
#define SHGetFolderPathAndSubDir SHGetFolderPathAndSubDirA
#endif // !UNICODE
#endif // _WIN32_IE >= 0x0500
#endif // _WIN32_IE >= 0x0400
... it would seem that it is only valid if _WIN32_IE is >= 0x0500. Now, this could well be set somewhere else and I don't have the time to track it, but you might try defining that symbol. If that doesn't compile, track the symbol and see where it is set.