I'm trying to create a new directory for save files in my game, and I'm getting an unresolved external symbol error when I use PathAppend
.
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_COMMON_DOCUMENTS, NULL, 0, path))) {
PathAppend(path, "AotDK\\saves");
if (SHCreateDirectoryEx(NULL, path, NULL) != ERROR_SUCCESS) {
std::cout << "Error: " << GetLastError();
}
} else {
std::cout << "Error: " << GetLastError();
}
I know that this usually means I haven't included a header file, but from what I can gather I've included all that I need. Am I missing one?
#include "main.hpp"
#include <iostream>
#include <Windows.h>
#include <ShlObj.h>
#include <Shlwapi.h>
If not, did I structure the code wrong? I based it off of a previously asked question's answer, so I would assume not.