Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.development.apps > #792
| Path | csiph.com!xmission!feeder.erje.net!us.feeder.erje.net!news.ripco.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news3 |
|---|---|
| From | Charlie Gibbs <cgibbs@kltpzyxm.invalid> |
| Newsgroups | comp.os.linux.development.apps |
| Subject | Beyond gtk_init_check() - how do I tell if GTK is installed? |
| Date | 1 Oct 2015 06:43:40 GMT |
| Organization | NewsGuy - Unlimited Usenet $23.95 |
| Lines | 30 |
| Message-ID | <muikms0poe@news3.newsguy.com> (permalink) |
| NNTP-Posting-Host | pde60c4efceb37179a6978a8ef8bcb055a960adb48281c1c8.newsdawg.com |
| User-Agent | slrn/1.0.1 (Linux) |
| X-Received-Bytes | 2118 |
| X-Received-Body-CRC | 1324984534 |
| Xref | csiph.com comp.os.linux.development.apps:792 |
Show key headers only | View raw
I've started learning how to write GTK code. One thing I noticed is that where gtk_init() will terminate your program if it can't find a display, gtk_init_check() will tell you whether it succeeded and let you use other means (e.g. curses or a text-based interface) if not. I've written a test program that uses this technique, and it works fine - at least as long as GTK is installed. However, if GTK is not installed, my program dies instantly. I think it's because it can't find needed dynamic libraries; however, the machine on which I tested it belongs to someone else who's now gone, and all of my machines already have GTK installed so I can't easily reproduce the condition. In a perfect world, gtk_init_check() would contain enough statically linked code that it could test for the presence of the GTK libraries and return an appropriate error if they're absent. But I guess I'll have to settle for some sort of programmatic test for the existence of these libraries that won't nuke my program if they're not there. Is there a way to do this? Can I coax the system to start executing my program and not insist on the presence of dynamic libraries before I need them, so I can check whether they're available? And how can I check whether they're available? aTdHvAaNnKcSe for any advice... -- /~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs) \ / I'm really at ac.dekanfrus if you read it the right way. X Top-posted messages will probably be ignored. See RFC1855. / \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!
Back to comp.os.linux.development.apps | Previous | Next — Next in thread | Find similar
Beyond gtk_init_check() - how do I tell if GTK is installed? Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2015-10-01 06:43 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Richard Kettlewell <rjk@greenend.org.uk> - 2015-10-01 09:30 +0100
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2015-10-01 18:00 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Richard Kettlewell <rjk@greenend.org.uk> - 2015-10-01 19:36 +0100
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2015-10-01 23:39 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2015-10-01 19:27 -0600
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2015-10-02 16:50 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Richard Kettlewell <rjk@greenend.org.uk> - 2015-10-02 09:27 +0100
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2015-10-02 16:50 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Jerry Peters <jerry@example.invalid> - 2015-10-01 20:12 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2015-10-01 23:39 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Jasen Betts <jasen@xnet.co.nz> - 2015-10-02 19:52 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2015-10-02 20:13 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Jerry Peters <jerry@example.invalid> - 2015-10-02 20:08 +0000
Re: Beyond gtk_init_check() - how do I tell if GTK is installed? Jasen Betts <jasen@xnet.co.nz> - 2015-10-02 19:38 +0000
csiph-web