> Sorry Paulo, I sent reply to one, first.
>
> One quick gotcha is that argv contains a vector of all the command
> options.
> These are typically separated by spaces when typed on the command line.
> However, your example has the whole command as one option.
> So put the wid to a std::string, widstring, and
>
> argv.push_back("mplayer");
> argv.push_back("-quiet");
> argv.push_back("-slave");
> argv.push_back("-idle");
> argv.push_back("-wid");
> argv.push_back(widstring);
> argv.push_back("/home/test.avi");
There's actually a function doing this for you,
Glib::shell_parse_argv
(http://gtkmm.org/docs/glibmm-2.4/docs/reference/html/group__ShellUtils.html#gbc52fcb14cfc7a5ba37ca821cc837818)
or you could use the Glib::spawn_command_line_sync/async functions.
>
>
Glib::spawn_async_with_pipes(std::string("/usr/bin"),argv,Glib::SpawnFlags(0));
>
> Personally, I'm using fork combined with execlp():
That's not very portable when concerning windows, is it?
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list