0

ここで説明されているように、boost::process::child を使用する方法があることを知っています。

boost::asio::boost::asio::io_service ios;

std::future<std::string> data;
child c("g++", "main.cpp", //set the input
        bp::std_in.close(),
        bp::std_out > bp::null, //so it can be written without anything
        bp::std_err > data,
        ios);


ios.run(); //this will actually block until the compiler is finished

auto err =  data.get();

これは、boost::process::spawn を呼び出すときに機能しますか? または、boost::process::child を使用する必要がありますか?

4

1 に答える 1