0

我正在尝试从 swig 的输出中编译一个 c++ dll 我收到一堆关于实际 php src 的错误,也许我做错了,但我什至在 windows 上使用 configure 然后 nmake 构建了 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

只需将项目运行时库从 Multi-thread DLL 更改为 Multi-thread

于 2012-09-18T08:25:20.137 回答