ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We're writing a Linux-based app; one of our requirements is that the GUI must be
able to address multiple different video cards independently.
SuSE 9.2 recognizes each of the three video cards in our system, and addresses t
hem as:
unix:0.0
unix:0.1
... and ...
unix:0.2
So far, so good.
I've installed the default GTK+/GDK libraries that come with SuSE 9.2 (GTK2, 2.4 .9-10.1), and I'm trying to adapt the sample code in "Multi-head Support Overview". It's failing with this link error:
make =>
gcc -g -O2 -o hello_glade main.o support.o interface.o callbacks.o \
-Wl,--export-dynamic -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 \
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 \
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
main.o(.text+0xb2): In function `main':
/home/paulsm/proj/hello_glade/src/main.c:56:
undefined reference to `gdk_display_new'
Does anybody have any ideas why my (C-language, not C++) build isn't finding this function?
Are there any alternative GTK+ functions for doing graphics I/O to multiple different video cards?
/* Assign screen and display */
gdisplay = gdk_display_open("unix:0.2");
if (gdisplay) {
GdkScreen *gscreen;
gscreen = gdk_display_get_default_screen(gdisplay);
if (gscreen) {
gtk_window_set_screen(GTK_WINDOW(window), gscreen);
}
else {
printf ("WARNING: Unable to get screen!\n");
...
2. Thank you, too, for your help ahwkong.
I discovered, however, that the reason "gtk-config" was pointing to my GTK 1.2 libraries ... is because
gtk-config (and glib-config, etc) are all GTK 1.2 scripts.
In GTK+ 2.0, all of the individual "g*-config" scripts have been replaced by one new, common tool:
pkg-config
<= THIS SHOULD BE USED FOR ALL CURRENT GTK+ DEVELOPMENT WORK
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.