[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: gdk-pixbuf and g++ linking problem
- From: Harring Figueiredo <harringf yahoo com>
- To: Struan Bartlett <struan kula newsnow net>,gtk_list gtk gtk <gtk-app-devel-list gnome org>
- Subject: Re: gdk-pixbuf and g++ linking problem
- Date: Fri, 3 Oct 2003 12:40:45 -0700 (PDT)
Struan,
This could be caused by the fact that the __cplusplus guard is not in the
header file ./gdk-pixbuf-xlib.h, and the c++ compiler is mangling the fuction
name.
try adding this to the top of the fule
#ifdef __cplusplus
extern "C"
#endif
at this to the end of the file - then recompile it.
#ifdef __cplusplus
}
#endif.
If it fix, file a bug or tell me so I can file the bug.
thanks,
Harring.
--- Struan Bartlett <struan@kula.newsnow.net> wrote:
> Hi,
>
> Thanks for checking this point.
>
> But I have lines in my Makefile like this:
>
> GFLAGS := $(shell gdk-pixbuf-config --cflags)
> GLIBS := $(shell gdk-pixbuf-config --libs)
>
> It produces a result like this:
>
> gcc -o wm2 Border.o Buttons.o Client.o Events.o Main.o Manager.o Rotated.o
> -L/usr/X11R6/lib -lXext -lX11 -lXt -lXmu -lSM -lICE -lm -L/usr/lib
> -lgdk_pixbuf -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule
> -lglib -ldl -lXi -lXext -lX11 -lm
> Border.o: In function `Border::drawLabel(void)':
> Border.o(.text+0x661): undefined reference to `background'
> Border.o(.text+0x666): undefined reference to
> `gdk_pixbuf_xlib_render_to_drawable(_GdkPixbuf *, unsigned long, _XGC *,
> int, int, int, int, int, int, XlibRgbDither, int, int)'
> collect2: ld returned 1 exit status
>
> As I said, I have taken these Makefile lines right out of another C
> program that calls the same gdk_pixbuf_xlib_render_to_drawable function.
>
> Struan
>
> On Fri, 3 Oct 2003, Harring Figueiredo wrote:
>
> >
> >
> > You are probably not passing the libs to the linker.
> >
> > Are you using pkg-config to supply the cflags and libs to the
> compiler/linker
> > ?
> >
> > Harring.
> >
> > --- Struan Bartlett <struan@praguespringpeople.org> wrote:
> > > I'm trying to write a pure X application in C++ that uses the gdk-pixbuf
> > > image composition and scaling routines.
> > >
> > > I'm using compiler/linker flags and library arguments that are known to
> > > work with a C program functionally similar to my C++ program.
> > >
> > > But when compiling my C++ program, the linker says:
> > >
> > > Border.o(.text+0x666): undefined reference to
> > > `gdk_pixbuf_xlib_render_to_drawable(_GdkPixbuf *, unsigned long, _XGC *,
> > > int, int, int, int, int, int, XlibRgbDither, int, int)'
> > >
> > > Please can you explain what I need to do to fix this?
> > >
> > > Struan Bartlett.
> > >
> > > _______________________________________________
> > > gtk-app-devel-list mailing list
> > > gtk-app-devel-list@gnome.org
> > > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Shopping - with improved product search
> > http://shopping.yahoo.com
> >
>
=====
==================================================================
Plese, don't send me any attachment in Micro$oft (.DOC, .PPT) format.
Read http://www.fsf.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Please, consider adding this text to Your email signature.
Harring Figueiredo
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]