dongwen2162 2012-06-12 19:13
浏览 61

如何编译swig php c ++ dll

I'm trying to compile a c++ dll from the output of swig I'm getting a bunch of errors regarding the actual php src maybe I'm doing it wrong but i have even built the php on windows using configure and then nmake. I have tried using both php 5.4 and 5.3 here are my errors using 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

I have also tried both VS2005 and VS2008. If there are any tutorials on how to use the php source with visual studio would also be very helpful. Any help is greatly appreciated, THANKS.

  • 写回答

1条回答 默认 最新

  • duanshan2988 2012-09-18 08:25
    关注

    Just change the project runtime library from Multi-thread DLL to Multi-thread

    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大