-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
See this question on stackoverflow. In order to compile the following C program on macOS :
#include <ApplicationServices/ApplicationServices.h>
#include <unistd.h>
void mmove(int x, int y);
int main() {
mmove(100,100);
}
void mmove(int x, int y) {
CGEventRef move = CGEventCreateMouseEvent( NULL, kCGEventMouseMoved, CGPointMake(x, y), kCGMouseButtonLeft );
CGEventPost(kCGHIDEventTap, move);
CFRelease(move);
}
the following command line can be used:
cc -o foo foo.c -framework ApplicationServices
But passing LIBS => " -framework ApplicationServices"
to WriteMakefile()
does not work. For example:
$ perl -MData::Dumper -MExtUtils::Liblist -E ' print Dumper(ExtUtils::Liblist->ext("-framework ApplicationServices"))'
$VAR1 = '';
$VAR2 = '';
$VAR3 = '';
$VAR4 = '';
However, passing LDDLFLAGS => "$Config{lddlflags} -framework ApplicationServices"
does work, but shouldn't it be possible to use LIBS
here ?