2018-06-12 14:11 阅读 49


As stated in the title, I'm trying to compile a program from within PHP using the i686-w64-mingw32-g++-posix cross-compiler.

When I execute the command on the command line, it works great. However when I use the exec function in PHP, it returns me the error:

i686-w64-mingw32-g++-posix: error trying to exec 'cc1plus': execvp: No such file or directory

So, I execute in PHP a command like:

exec('i686-w64-mingw32-g++-posix ....');
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    dongquan6030 dongquan6030 2018-06-12 14:26

    exec('/full/path/i686-w64-mingw32-g++-posix ....');.

    You can use tools like whereis or locate to actually get the full path.

    点赞 评论 复制链接分享