2012-06-12 178 views
0

我想从swig的输出中编译一个C++ dll我得到了一堆关于实际的php src的错误也许我做错了,但我甚至已经构建了在Windows上使用配置,然后nmake php。 我一直在使用这两个PHP 5.4和5.3 这里使用Visual Studio 2008年我的错误的尝试:如何编译swig php C++ dll

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源代码的教程也会非常有帮助。 任何帮助非常感谢,谢谢。

回答

0

只需将项目运行时库从多线程DLL更改为多线程