Having trouble linking to glib



I am trying to write a simple console application that links to glib. I
am using visual studio 2003 on windows xp. It is my understanding that I
don't need to compile Glib to do this. If I go to the ftp site: 
ftp://ftp.gtk.org/pub/glib/2.12/win32

I see that there are zip files like glib-2.12.1.zip that has dlls in it.
There are also files like glib-dev-2.12.1.zip that has header files and
lib files and dlls. I am not sure what I should be using.

What dlls should I be using and what lib files should I link with? Here
is the simple code that I am trying to compile. I have all of my paths
set in my project so that I can find the appropriate header files. My
current problem is trying to link.

/*---- CODE
#include <stdio.h>
#include <glib.h>

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

  // try to use something from GLib
  GString *str;

  str = g_string_new("hello world.\n");

  printf("hello world.\n");

  char c;
  scanf("%c", &c);
  return 0;
}
/*---- END CODE

Any help would be greatly appreciated.

Alan Lemon



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