static executable, can't open $DISPLAY



Hi all,
I've got a bit of a wierd problem here, and am wondering if anyone has seen
it before.  I don't think its directly a GTK problem per se, but maybe
someone here has seen this before... 
(Note - Let me be explicitely clear ahead of time - My $DISPLAY is correctly
set)

I'm working on Linux (Mandrake 8.1, gcc 3.0.1, etc) with gtk 1.2.10 (Ximian)
When I build a dynamic executable, everything works find, as expected.
When I build a static executable (-static linker option), I can't run the
executable any more.  When I try, I get the following output:

% ./a.out

Gdk-WARNING **: locale not supported by Xlib, locale set to C

Gdk-WARNING **: can not set locale modifiers

Gtk-WARNING **: cannot open display: :0

Note that I do not get these locale messages when running the dynamic one.
Not knowing much about locales, I'm pretty sure that I'm not explicitely
doing anything, nor do I think my environment has anything strange...
% env | grep LC_
LC_MESSAGES=en_US
LC_TIME=en_US
LC_NUMERIC=en_US
LC_CTYPE=en_US
LC_MONETARY=en_US
LC_COLLATE=C

Hmmm... lets see... what else....  Most of the GTK code was generated from
Glade, the executable is C++, no threads, no exceptions, strace didn't
show anything interesting...
Does anyone know what is going on here?
Thanks for any info!
Ian



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