posible error in glib.h ?
- From: Simon Gornall <simon unique-id com>
- To: gtk mailing list <gtk-list redhat com>
- Subject: posible error in glib.h ?
- Date: Fri, 08 Oct 1999 13:21:27 +0100
I have to compile a Linux GTK-based program on Solaris 2.6
and since I don't want to install gtk/glib on every sun box
here, I wanted to link statically to GTK/Glib.
I made glib and gtk and moved *so* from the /opt/gtk/lib
directory into /opt/gtk/lib/shared/ so that the program
would link statically unless I specified the shared dir.
When it links, I get the following errors:
g++ -o uid-vidc main.o timecode.o FrameBuffer.o Fetcher.o Imager.o Config.o
jpegsrc.o skin.o -L/usr/X11R6/lib -L/opt/gtk/lib -lgtk -lgdk -lgmodule -lglib
-ldl -lXext -lX11 -lsocket -lnsl -lm -lpthread -L/opt/uid/jpeg/lib -ljpeg
-lsocket -lnsl -lXext -lX11 -lm
ld: fatal: symbol `g_bit_storage' is multiply defined:
(file main.o and file /opt/gtk/lib/libglib.a(gutils.o));
ld: fatal: symbol `g_bit_nth_msf' is multiply defined:
(file main.o and file /opt/gtk/lib/libglib.a(gutils.o));
ld: fatal: symbol `g_bit_nth_lsf' is multiply defined:
(file main.o and file /opt/gtk/lib/libglib.a(gutils.o));
ld: fatal: File processing errors. No output written to uid-vidc
Having looked in gutils.o, it seems that 'g_bit_storage' is
defined to be an inline function in glib.h as follows:
G_INLINE_FUNC guint g_bit_storage (guint number);
#ifdef G_CAN_INLINE
G_INLINE_FUNC guint
g_bit_storage (guint number)
{
register guint n_bits = 0;
do
{
n_bits++;
number >>= 1;
}
while (number);
return n_bits;
}
#endif /* G_CAN_INLINE */
so should I try turning off G_CAN_INLINE when compiling glib ?
I'm running with:
> uname -a
SunOS sam 5.6 Generic_105181-09 sun4m sparc SUNW,SPARCstation-10
> gcc -v
Reading specs from /opt/GCC281/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/specs
gcc version 2.8.1
Any help gratefully received
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]