Relative Paths Not Working in Xcode C++
Took me about 5 hours of Google and trying different things to FINALLY find the answer! #ifdef __APPLE__ #include “CoreFoundation/CoreFoundation.h” #endif // —————————————————————————- // This makes relative paths work in C++ in Xcode by changing directory to the Resources folder inside the .app bundle #ifdef __APPLE__ CFBundleRef mainBundle = CFBundleGetMainBundle(); CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); char … Read more