簡體   English   中英

使用 Microsoft VC (cl.exe) 2010 (10.0) Express 和 ActivePerl 5.12.4/32 構建 Perl/C 模塊

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

我使用標題中提到的配置面臨這個構建問題。 我正在嘗試構建的 Perl 模塊是MongoDB::Connection 我正在通過 CPAN shell 構建,或者像這樣手動構建:

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

cl.exe的命令行是:

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

以下是錯誤代碼及其頻率:

 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

在我看來,所有這些錯誤都是預處理階段失敗的症狀。

這里我就不貼整個output了,但是開頭是:

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: Syntaxfehler: Es fehlt ')' vor '*'
c:\opt\perl512.32\lib\core\win32.h(369) : error C2081: 'STRLEN': Name in der formalen Parameterliste ist ungültig

因此,鑒於線索Stat_t ,我試圖追查這個問題。

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

所以Stat_tCORE\dosish.hCORE\unixish.h中定義。 兩者都有條件地包含在CORE\perl.h中。 這包含在我要編譯的文件中。 所以它應該工作。

  • 我可以做些什么來追蹤問題?
  • 是什么導致了這個失敗?

網上也有一些類似的錯誤。 這里有一個谷歌搜索給你:

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

謝謝。

這看起來像一個錯誤報告。 也許值得發送到 CPAN 錯誤跟蹤器? https://rt.cpan.org/Public/Dist/Display.html?Name=MongoDB

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM