0

swig の出力から c++ dll をコンパイルしようとしていますが、実際の php src に関して多くのエラーが発生しています。おそらく私は間違っていますが、configure と nmake を使用して Windows で php をビルドしました。php 5.4 と 5.3 の両方を使用してみましたが、Visual Studio 2008 を使用した場合のエラーは次のとおりです。

Error   3   error C2491: 'std::endl' : definition of dllimport function not allowed c:\program files (x86)\microsoft visual studio 9.0\vc\include\ostream   967 LTMC_Wrapped
Error   4   error C2491: 'std::endl' : definition of dllimport function not allowed c:\program files (x86)\microsoft visual studio 9.0\vc\include\ostream   976 LTMC_Wrapped
Error   5   error C2491: 'std::ends' : definition of dllimport function not allowed c:\program files (x86)\microsoft visual studio 9.0\vc\include\ostream   985 LTMC_Wrapped
Error   6   error C2491: 'std::ends' : definition of dllimport function not allowed c:\program files (x86)\microsoft visual studio 9.0\vc\include\ostream   993 LTMC_Wrapped
Error   7   error C2491: 'std::flush' : definition of dllimport function not allowed    c:\program files (x86)\microsoft visual studio 9.0\vc\include\ostream   1001    LTMC_Wrapped
Error   8   error C2491: 'std::flush' : definition of dllimport function not allowed    c:\program files (x86)\microsoft visual studio 9.0\vc\include\ostream   1009    LTMC_Wrapped
Error   9   error C2491: 'std::ws' : definition of dllimport function not allowed   c:\program files (x86)\microsoft visual studio 9.0\vc\include\istream   1068    LTMC_Wrapped
Error   10  error C2491: 'std::ws' : definition of dllimport function not allowed   c:\program files (x86)\microsoft visual studio 9.0\vc\include\istream   1103    LTMC_Wrapped

また、VS2005 と VS2008 の両方を試しました。Visual Studio で php ソースを使用する方法に関するチュートリアルがあれば、それも非常に役立ちます。どんな助けでも大歓迎です、ありがとう。

4

1 に答える 1

0

プロジェクトのランタイム ライブラリをマルチスレッド DLL からマルチスレッドに変更するだけです。

于 2012-09-18T08:25:20.137 に答える