SIGAR在OS下编译

SIGAR在OS下编译
@import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); @import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
编译:
修改Makefile.PL:
$archname="universal64-macosx";

去除生成的makefile中所有-arch i386 -Werror

make all


最后把所有可执行文件拷到同一目录,再用
export DYLD_LIBRARY_PATH=/tmp/test
即可直接运行:

eb:tmp$ ls ./test/
Sigar.bundle cpu_info.pl
Sigar.pm libsigar-universal64-macosx.dylib
eb:tmp popeyecai$ perl -I./test ./test/cpu_info.pl 
2 total CPUs..
Vendor........Intel
Model.........Macmini4,1
Mhz...........2660
Cache size....3072
Vendor........Intel
Model.........Macmini4,1
Mhz...........2660
Cache size....3072



有兴趣可以访问下我的生活博客: qqmovie.qzone.com

你可能感兴趣的:(SIGAR在OS下编译)