我的 c 代码使用“show_error_message”(GTK2)
#include <gnome.h>
#include <profiles/audio-profile.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
..........................................................................
static void error_cb(GstBus *bus, GstMessage *message, gpointer user_data)
{
GError *error = NULL;
GstElement *pipeline = user_data;
g_assert(pipeline);
/* Make sure the pipeline is not running any more */
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_message_parse_error(message, &error, NULL);
show_error_message(_("GStreamer runtime error."), error->message);
g_error_free(error);
}
得到这些警告:
warning: implicit declaration of function 'show_error_message'
和
#include <config.h>
#include <gnome.h>
#include <gconf/gconf-client.h>
#include <math.h>
.................................................
/* Initizialize Gconf */
if (!gconf_init(argc, argv, &err)) {
char *details;
details = g_strdup_printf(_("%s\n\nChanges to the settings won't be saved."), err->message);
show_warning_message(_("Failed to init GConf!"), details);
g_error_free(err);
g_free(details);
err = NULL;
} else {
gconf_client_set_global_default_error_handler((GConfClientErrorHandlerFunc)gconf_error_handler);
gconf_client_set_error_handling(gconf_client_get_default(), GCONF_CLIENT_HANDLE_ALL);
gnome_media_profiles_init(gconf_client_get_default());
}
得到这些警告:
warning: implicit declaration of function 'gnome_media_profiles_init'
..................................................... ......你能告诉我如何解决这些警告吗?
谢谢你。