g_malloc and glib.h



Hello,

My compiler can't seem to find g_malloc and g_free.
I'm sure that I'm just not giving the right flags to gcc.


I want to use the 'regression.c' from Gnumeric.  I copied that file to my
working directory, as well as all the files that it depends on.

This is my Makefile

CFLAGS=-Wall -lm -DSTANDALONE
INC=-I/usr/include/glib-1.2/ -I/usr/lib/glib/include/ \
        -I/usr/X11R6/include/gnome-1.0

all:
        gcc $(CFLAGS) $(INC) non-linear-fit.c -o fit


The errors that I get look like this:

/tmp/ccJpRprr.o(.text+0xf17): undefined reference to `g_malloc'
/tmp/ccJpRprr.o(.text+0xfec): undefined reference to `g_free'


Gnumeric compiles fine in my system, so I'm sure that I've just made a
mistake in my Makefile.


Does anyone know what I'm missing?

Thanks a lot,
Daniel.




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