如果碰巧你使用的是官方tar包,那么恭喜你,你make的时候可能会遇到如下错误,很多网友都会遇到的。
../src/.libs/libeglib.a(libeglib_la-gunicode.o): In function `monoeg_g_get_charset':/root/mono/eglib/src/gunicode.c:223: undefined reference to `locale_charset'collect2: ld returned 1 exit statusmake[4]: *** [test-eglib] Error 1make[4]: Leaving directory `/root/mono/eglib/test'make[3]: *** [all-recursive] Error 1make[3]: Leaving directory `/root/mono/eglib'make[2]: *** [all] Error 2make[2]: Leaving directory `/root/mono/eglib'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/root/mono'make: *** [all] Error 2
怎么解决呢?那么我们就改源码目录下(eglib/config.h)文件中的代码:
#define HAVE_LOCALCHARSET_H 1 改为 #define HAVE_LOCALCHARSET_H 0
附:需要configure后才可编辑。