LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-29-2005, 10:47 AM   #1
LegendBreath
Member
 
Registered: Apr 2005
Location: New Brunswick, Canada
Distribution: Fedora Core 3
Posts: 39

Rep: Reputation: 15
GTK+ with Glade, "PACKAGE" giving me an error?


Hi there,
Glade as generated my main.c and here is what it gives me:
Code:
/*
 * Initial main.c file generated by Glade. Edit as required.
 * Glade will not overwrite this file.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gtk/gtk.h>

#include "interface.h"
#include "support.h"

#ifdef G_OS_WIN32
char *package_prefix;
char *package_datadir;
#endif

int
main (int argc, char *argv[])
{
  GtkWidget *mediacenter;

#ifdef G_OS_WIN32
  gchar *temp;

  package_prefix = g_win32_get_package_installation_directory (NULL, NULL);
  package_datadir = g_strdup_printf ("%s%s", package_prefix, "/share");
#endif

#ifdef ENABLE_NLS
#ifdef G_OS_WIN32
  temp = g_strdup_printf ("%s%s", package_prefix, "/lib/locale");
  bindtextdomain (GETTEXT_PACKAGE, temp);
  g_free (temp);
#else
  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
#endif
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  textdomain (GETTEXT_PACKAGE);
#endif

  gtk_set_locale ();
  gtk_init (&argc, &argv);

#ifdef G_OS_WIN32
  temp = g_strdup_printf ("%s/%s%s", package_datadir, PACKAGE, "/pixmaps");
  add_pixmap_directory (temp);
  g_free (temp);
#else
  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
#endif


  /*
   * The following code was added by Glade to create one of each component
   * (except popup menus), just so that you see something after building
   * the project. Delete any components that you don't want shown initially.
   */
  mediacenter = create_mediacenter ();
  gtk_widget_show (mediacenter);

  gtk_main ();

#ifdef G_OS_WIN32
  g_free (package_prefix);
  g_free (package_datadir);
#endif
  return 0;
}
But it gives me an error because of this line:
Code:
#ifdef G_OS_WIN32
  temp = g_strdup_printf ("%s/%s%s", package_datadir, PACKAGE, "/pixmaps");
  add_pixmap_directory (temp);
  g_free (temp);
#else
  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
#endif
And finally the error is:
Code:
Compiling...
interface.c
main.c
c:\projects\elmonia\media center\src\main.c(48) : error C2065: 'PACKAGE' : undeclared identifier
support.c
Error executing cl.exe.

main.exe - 1 error(s), 0 warning(s)
Why is it giving me that error??
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"mythtv-setup" giving "Session management error: Authentication Rejected" Mitchua Ubuntu 0 10-09-2005 04:32 PM
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 04:51 AM
RH keeps on giving me "Package Not Found" when installing PHP-related RPMs guest Linux - Newbie 4 03-24-2005 11:07 PM
Small linux giving "Warning: dev (4:01)...." error during bootup. WJWhite Linux - Newbie 1 01-23-2004 11:03 PM
kldload keeps giving "Exec format error" jd121 *BSD 1 07-20-2003 11:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration