Re: How do I use Glib::spawn_async_with_pipes on Windows



Paulo Flabiano Smorigo schrieb:
> Hi again,
> 
> I tried to change the line to see if it works but no success. The error
> say "no matching function". I try many differents forms but none works...
> 
> The line in my code that calls spawn_async_with_pipes:
> Glib::spawn_async_with_pipes("\"c:/\"", "\"c:/windows/NOTEPAD.EXE\"",
> Glib::SpawnFlags(0), sigc::slot<void>(), &m_intPlayerPID,
> &m_intPlayerIn, &m_intPlayerOut, &m_intPlayerError);
> 
> The error:
> Player.cpp: In member function `void Player::play(int)':
> Player.cpp:51: error: no matching function for call to
> `spawn_async_with_pipes(const char[6], const char[25], Glib::SpawnFlags,
> sigc::slot<void, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil,
> sigc::nil, sigc::nil>, int*, int*, int*, int*)'
> /opt/gtk28win/include/glibmm-2.4/glibmm/spawn.h:147: note: candidates
> are: void Glib::spawn_async_with_pipes(const std::string&, const
> Glib::ArrayHandle<std::string,
> Glib::Container_Helpers::TypeTraits<std::string> >&, const
> Glib::ArrayHandle<std::string,
> Glib::Container_Helpers::TypeTraits<std::string> >&, Glib::SpawnFlags,
> const sigc::slot<void, sigc::nil, sigc::nil, sigc::nil, sigc::nil,
> sigc::nil, sigc::nil, sigc::nil>&, void**, int*, int*, int*)
> /opt/gtk28win/include/glibmm-2.4/glibmm/spawn.h:156:
> note:                 void Glib::spawn_async_with_pipes(const
> std::string&, const Glib::ArrayHandle<std::string,
> Glib::Container_Helpers::TypeTraits<std::string> >&, Glib::SpawnFlags,
> const sigc::slot<void, sigc::nil, sigc::nil, sigc::nil, sigc::nil,
> sigc::nil, sigc::nil, sigc::nil>&, void**, int*, int*, int*)

I didn't look at the documentation but by looking at the error the
second argument can't probably be a string constant because
Glib::ArrayHandle<> doesn't have a constructor taking a string constant.


--
Klaus


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]