Is it possible to determine the location of the pkg file being ran from inside of an InstallerJS block? If so what would the function invocation be?
Post
Replies
Boosts
Views
Activity
I'm attempting to determine whether there is a currently logged on user via the SCDynamicStoreCopyConsoleUser function.
My code look something along the lines of:
#include <SystemConfiguration/SystemConfiguration.h>
bool isUserLoggedOn()
{
CFStringRef name = SCDynamicStoreCopyConsoleUser(NULL, NULL, NULL);
if (name != NULL)
{
CFRelease(name);
return true;
}
return false;
}
I am getting the following error output on compilation:
Undefined symbols for architecture arm64:
"_CFRelease", referenced from:
isUserLoggedOn() in UserInfo.cpp.o
"_SCDynamicStoreCopyConsoleUser", referenced from:
isUserLoggedOn() in UserInfo.cpp.o
ld: symbol(s) not found for architecture arm64