在perl高于5.12版的时候编译会出现
mongo_support.c: In function 'elem_to_sv':
mongo_support.c:432:18: error: 'PMf_LOCALE' undeclared (first use in this function)
mongo_support.c:432:18: note: each undeclared identifier is reported only once for each function it appears in
dmake.exe: Error code 129, while making 'mongo_support.o'
原因是perl5.12以后xs的方法有所变化,简单的做法就是编辑
mongo_support.c
找到
flags |= PMf_LOCALE;
修改为
#if PERL_REVISION==5 && PERL_VERSION>12
set_regex_charset(flags, REGEX_LOCALE_CHARSET);
#else
flags |= PMf_LOCALE;
#endif
在编译