作者: 藤岡和夫
日時: 2005/2/15(21:04)
On Tue, 15 Feb 2005 04:02:42 +0900
dune <FZH01112@...> さんwrote:

> set include="C:\Program Files\Microsoft Visual
> C++ Toolkit 2003\include"
> 
> でヘッダのパスを環境変数に設定する。
> set lib=...(ライブラリのパスの設定)も必要かも。
> .NET だと設定されてた覚えがあります。

 コメントありがとうごさいます。

 調べてみますと、Visual C++ Toolkit 2003 Command Promptというのが付いて
いて、これを動かすとINCLUDEとLIBが設定されます。これはコマンドプロンプト
起動時にvcvars32.batというバッチファイルを起動することによって実現してい
るようです。これだけだと、windows.hがないと言われるので、Microsoft SDKの
includeをINCLUDEに加えると、

C:\Scripts\Perl\Clone-0.15>nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

        cl.exe -c "C:\Program Files\Microsoft Visual C++ Toolkit 2003\include" -
Od -MD -DNDEBUG -TP -GX -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_
OBJECT -O3     -DVERSION=\"0.15\"  -DXS_VERSION=\"0.15\"  -IC:\Perl\lib\CORE  Cl
one.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

cl : Command line warning D4002 : ignoring unknown option '-O3'
include
c1xx : fatal error C1083: Cannot open source file: 'C:\Program Files\Microsoft V
isual C++ Toolkit 2003\include': Permission denied
Clone.c
Clone.xs(40) : error C2143: syntax error : missing ',' before '->'
Clone.xs(42) : error C2065: 'target' : undeclared identifier
Clone.xs(43) : error C2039: 'Perl_ref' : is not a member of 'sv'
        c:\Perl\lib\CORE\sv.h(35) : see declaration of 'sv'
Clone.xs(45) : error C2065: 'depth' : undeclared identifier
Clone.xs(45) : error C3861: 'depth': identifier not found, even with argument-de
pendent lookup
Clone.xs(51) : error C2039: 'Perl_hv_iterinit' : is not a member of 'sv'
        c:\Perl\lib\CORE\sv.h(35) : see declaration of 'sv'
Clone.xs(52) : error C2039: 'Perl_hv_iternext' : is not a member of 'sv'
        c:\Perl\lib\CORE\sv.h(35) : see declaration of 'sv'
Clone.xs(52) : fatal error C1903: unable to recover from previous error(s); stop
ping compilation
Generating Code...
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x2'
Stop.

 なかなか難しいようです。

藤岡 和夫
kazuf@...
TS Networkのために http://homepage1.nifty.com/kazuf/