作者bobhsiao (㊣小臃肿㊣)
看板Perl
标题[心得] 编译 MicroPerl using VS2008 Express
时间Sat Mar 27 12:19:26 2010
主要是参考这位日本仁兄的心得:
http://pub.ne.jp/wakapon/?entry_id=1174512 网址1
http://pub.ne.jp/wakapon/?entry_id=1056978 网址2
目前最新的 5.10.1 也可以编得出来
步骤如下:
1. 另存网址2的
Makefile.w32 及 win32_micro.c 到 x:\path\perl-5.XX.X\
2. 修改
uconfig.h:
(1) disable:
#define I_DIRENT
(2) disable:
#define Direntry_t struct dirent
3. 修改
unixish.h:
(1) #define BIT_BUCKET "/dev/null" 改为
#define BIT_BUCKET ""
4. nmake -f Makefile.w32 (记得用 「Visual Studio 2008 命令提示字元」)
补充:
1. 在 linux based 环境编出 microperl 简单很多: make -f Makefile.micro
虽然也可以用 cygwin 编出 microperl, 但还是需要 cygwin1.dll
2. 原文提供的 Makefile 内的 CFLAGS 没加最佳化选项,
可以再加 /O1 or /O2 or /Ox
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 219.84.254.179