Building 2.2.12 with recent glib: "cannot convert `int*' to `void**' for argument"...



For various technical reasons (I won't bother you with the details), I want to compile gtkmm 2.2.12 on a setup with a quite recent glib version (2.6 or newer.) Unfortunately, the build fails with the following message

   spawn.cc: In function `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::Slot0<void>&, int*, int*, int*, int*)':
   spawn.cc:92: error: cannot convert `int*' to `void**' for argument
   `7' to `gboolean g_spawn_async_with_pipes(const gchar*, gchar**,
   gchar**, GSpawnFlags, void (*)(void*), void*, void**, gint*, gint*,
   gint*, GError**)'


The explanation of this is simply that the type of "pid" arguments in glib has changed from "int" to GPid, which is apparently equivalent to "void *".

What do you think is the best way to solve this problem? Has anyone else encountered it, anyway? Also (a somewhat off-topic question), is there any way I can tell g++ to ignore the error, i.e. allow implicit conversion between int and void *?

- Toralf




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