2014-11-02 66 views
4

试图在Windows 7上运行Inline :: C(使用活动的perl 5.14),出现了一些错误。不确定在哪里安装库“bufferoverflowU”。它真的需要吗?运行内联错误:: C

perl te.pl 
Set up gcc environment - 4.8.2 
C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typemap "C:\Perl64\lib\ExtUtils\typemap" te1_pl_1114.xs > te1_pl_1114.xsc && C:\Perl64\bin\perl.exe -MExtUtils::Command -e "mv" -- te1_pl_1114.xsc te1_pl_1114.c 
c:/WINBUI~1/bin/gcc.exe -c -I"C:/winbuild64/test" -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -O2 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" "-IC:\Perl64\lib\CORE" te1_pl_1114.c 
Running Mkbootstrap for te1_pl_1114() 
C:\Perl64\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 te1_pl_1114.bs 
C:\Perl64\bin\perl.exe -MExtUtils::Mksymlists \ 
    -e "Mksymlists('NAME'=>\"te1_pl_1114\", 'DLBASE' => 'te1_pl_1114', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" 
Set up gcc environment - 4.8.2 
dlltool --def te1_pl_1114.def --output-exp dll.exp 
c:\WINBUI~1\bin\g++.exe -o blib\arch\auto\te1_pl_1114\te1_pl_1114.dll -Wl,--base-file -Wl,dll.base -mdll -L"C:\Perl64\lib\CORE" te1_pl_1114.o C:\Perl64\lib\CORE\perl514.lib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -lbufferoverflowU -lmsvcrt dll.exp 
c:/winbui~1/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lbufferoverflowU 
collect2.exe: error: ld returned 1 exit status 
dmake.exe: Error code 129, while making 'blib\arch\auto\te1_pl_1114\te1_pl_1114.dll' 

A problem was encountered while attempting to compile and install your Inline 
C code. The command that failed was: 
    C:\Perl64\site\bin\dmake.exe > out.make 2>&1 

The build directory was: 
C:\winbuild64\test\_Inline\build\te1_pl_1114 

To debug the problem, cd to the build directory, and inspect the output files. 

at te1.pl line 6 
    ...propagated at C:/Perl64/site/lib/Inline/C.pm line 798. 
BEGIN failed--compilation aborted at te1.pl line 6. 

Perl的文件非常简单

use Inline C => <<'END_C'; 

void greet() { 
     printf("Hello, world\n"); 
} 
END_C 

greet; 

回答

1

bufferoverflowU不是一个Perl库。它是Windows SDK的一部分,但未包含在最新版本中。猜测,您正在使用ActivePerl,并使用其PPM安装Inline :: C。他们的Inline :: C副本将针对他们在构建机器上具有的任何版本的Windows SDK而构建。但是你的机器似乎有一个更新的SDK。

您可以尝试下载最新的Inline::C tarball并将其构建在您自己的机器上。这将有望替换您的Inline :: C的旧副本,并希望工作。

+0

感谢tobyink的背景。 perl 5.16的PPM不支持Inline :: C,所以我不得不下载tarball并自己“安装”它。进展顺利。唯一的问题是编译错误。将尝试安装SDK。 – packetie 2014-11-03 04:39:54