[Glade-users] (newbie) gcc compilation
- From: mekstran at scl.ameslab.gov (Michael Ekstrand)
- Subject: [Glade-users] (newbie) gcc compilation
- Date: Tue, 01 May 2007 13:31:36 -0500
On Tue, 2007-05-01 at 20:24 +0200, david cobac wrote:
All is ok when i run my age output file under he directory including
the .glade file, but when i move my binary file, i've got a lot of
errors, it seems that it's looking for the .glade file...
I've surely miised some compilation option...but what ?
libglade will need to be able to find your glade file at runtime. If
you don't specify a path, it looks in the current directory; this is
fine until you move the app (or run it from some other location). You
need to do one of a couple things:
You can arrange to have your glade file installed in a known location.
In general, this is probably the preferred way to solve this problem.
Many applications store their glade files somewhere under
$PREFIX/share/$APPLICATION, where $PREFIX is the installation prefix
(e.g. /usr/local). Many applications use autoconf/automake to manage
their build systems, allowing the user a great deal of customization as
to where things are. These paths (such as the value of $PREFIX) will be
built in to the application, so it knows where to look.
You could also, as a part of your build process, convert your .glade
file to a .c file defining a C string containing the contents of your
glade file, and load the UI from that buffer rather than a file. This
would allow the application to keep running anywhere you drop it, but
requires more rebuilding when you change the UI in Glade.
My application does the former - glade files are installed in
$PREFIX/share/goanna/glade by default.
- Michael
--
Michael Ekstrand
Research Assistant, Scalable Computing Laboratory
Goanna, compute cluster and InfiniBand network monitor tool:
http://www.scl.ameslab.gov/Projects/Monitor/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]