开发者

Building Perl/C module using Microsoft VC (cl.exe) 2010 (10.0) Express and ActivePerl 5.12.4/32

开发者 https://www.devze.com 2023-03-21 03:28 出处:网络
I\'m facing this build problem using the configuration mentioned in the title. The Perl module I\'m trying to build is MongoDB::Connection. I\'m building via the CPAN shell, or manually like this:

I'm facing this build problem using the configuration mentioned in the title. The Perl module I'm trying to build is MongoDB::Connection. I'm building via the CPAN shell, or manually like this:

C:\Opt\Perl512.32\bin\perl.exe Makefile.PL
nmake

The command line for cl.exe is:

cl -c -I. -MD -Zi -DNDEBUG -DVERSION=\"0.43\" -DXS_VERSION=\"0.43\" ^
  /Foxs/BSON.obj "-IC:\Opt\Perl512.32\lib\CORE" xs\BSON.c

Here are the error codes and their frequencies:

 6 C2040 'operator' : 'identifier1' differs in levels of indirection
                      from 'identifier2'
32 C2059 syntax error : 'token'
 7 C2081 'identifier' : name in formal parameter list illegal
54 C2143 syntax error : missing 'token1' before 'token2'
 2 C2371 'identifier' : redefinition; different basic types

It looks to me like all these errors are symptoms of a failure in the preprocessing stage.

I won't paste the entire output here, but the beginning is:

c:\opt\perl512.32\lib\core\win32.h(368) : error C2143: Syntaxfehler: Es fehlt ')' vor '*'
c:\opt\perl512.32\lib\core\win32.h(368) : error C2081: 'Stat_t': Name in der formalen Parameterliste ist ungültig
c:\opt\perl512.32\lib\core\win32.h(368) : error C2143: Syntaxfehler: Es fehlt '{' vor '*'
c:\opt\perl512.32\lib\core\win32.h(368) : error C2059: Syntaxfehler: ')'
c:\opt\perl512.32\lib\core\win32.h(369) : error C2143: Syntaxfehle开发者_高级运维r: Es fehlt ')' vor '*'
c:\opt\perl512.32\lib\core\win32.h(369) : error C2081: 'STRLEN': Name in der formalen Parameterliste ist ungültig

So given the clue Stat_t, I tried to track down the issue.

ack Stat_t c:\opt\perl512.32\lib\core\

So Stat_t is defined in CORE\dosish.h and CORE\unixish.h. Both are conditionally included from CORE\perl.h. Which is included from the file I'm trying to compile. So it should work.

  • What can I do to track the issue down?
  • What's causing this failure?

There are some similar errors floating about the net. Here a Google search for you:

http://www.google.com?q=perl+win32.h+c2059+c2143+c2081+c2371

Thanks.


This looks like a bug report. Maybe it's worth sending to CPAN bug tracker? https://rt.cpan.org/Public/Dist/Display.html?Name=MongoDB

0

精彩评论

暂无评论...
验证码 换一张
取 消