[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    string stream io and gtk-config
From:       "Nicholas T." <latex7 () earthlink ! net>
Date:       1999-04-27 19:57:56
[Download RAW message or body]

i'm having trouble getting c++ string stream io to work (ostrstream)
when compiling with `gtk-config --libs`
in particular i've narrowed the problem down to `gtk-config --libs`
containing "-L/usr/lib"...with that option my program links with
libstdc++ 2.9 instead of libstdc++-libc6 and linking with the first one
causes it to crash. (in the ostream operator << call i think). is there
any way to make sure the libc6 stdc++ library is linked when i use
`gtk-config --libs` ?

thanks,

josh

to clarify, below is the g++ command line and ldd output for each
version (one using `gtk-config --libs` and the other w/o "-L/usr/lib"):

[latex@cursive TEST]$ g++ test.cc `gtk-config --cflags` `gtk-config
--libs` -o test
[latex@cursive TEST]$ ldd test
        libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x4001a000)
        libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0x4013c000)
        libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x4016e000)

        libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x40171000)
        libdl.so.2 => /lib/libdl.so.2 (0x40194000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40197000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401a2000)
        libstdc++.so.2.9 => /usr/lib/libstdc++.so.2.9 (0x4023f000)
        libm.so.6 => /lib/libm.so.6 (0x40282000)
        libc.so.6 => /lib/libc.so.6 (0x4029e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

[latex@cursive TEST]$ g++ test.cc `gtk-config --cflags` -L/usr/X11R6/lib

-lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXext -lX11 -lm -o test
[latex@cursive TEST]$ ldd test
        libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x4001a000)
        libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0x4013c000)
        libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x4016e000)

        libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x40171000)
        libdl.so.2 => /lib/libdl.so.2 (0x40194000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40197000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401a2000)
        libstdc++-libc6.1-1.so.2 => /usr/lib/libstdc++-libc6.1-1.so.2
(0x4023f000)
        libm.so.6 => /lib/libm.so.6 (0x40281000)
        libc.so.6 => /lib/libc.so.6 (0x4029d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)




-- 
         To unsubscribe: mail gtk-app-devel-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

	Mailing list concerns should be mailed to <listmaster@redhat.com>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic