I am trying to get the NSHomeDirectory()
in pure C
#include <CoreFoundation/CFBundle.h>
#include <CoreFoundation/CoreFoundation.h>
void testFunc() {
printf(NSHomeDirectory());
}
I am trying to get the NSHomeDirectory()
in pure C
#include <CoreFoundation/CFBundle.h>
#include <CoreFoundation/CoreFoundation.h>
void testFunc() {
printf(NSHomeDirectory());
}
Copyright © 2021 Jogjafile Inc.
You need to send the
UTF8String
message to theNSString
object returned byNSHomeDirectory()
to obtain a C string. To do this in pure C (Tested):Note: Compile using
-framework Cocoa