Very simple gdk-pixbuf question/new to programming
- From: "Morten B. Pedersen" <morten wtf dk>
- To: gtk-app-devel-list gnome org
- Subject: Very simple gdk-pixbuf question/new to programming
- Date: Wed, 11 Oct 2000 12:14:26 +0200
Hi,
I'm very new to programming in C/C++ - but I just wanted to try playing
around with gdk-pixbuf.
Sorry if this question is unrelated to the mailing list.
When I compile my source, I get:
$ g++ main.cpp
/tmp/ccdZSqAL.o: In function `main':
/tmp/ccdZSqAL.o(.text+0xf): undefined reference to `gdk_pixbuf_new_from_file'
/tmp/ccdZSqAL.o(.text+0x27): undefined reference to `gdk_pixbuf_get_width'
/tmp/ccdZSqAL.o(.text+0x3d): undefined reference to `gdk_pixbuf_get_height'
collect2: ld returned 1 exit status
I don't understand why this happens, because I have:
#include <gtk/gtk.h> and
#include <gdk-pixbuf/gdk-pixbuf.h>
Shouldn't this work then?
My whole source code below (I know, it doesn't do anything really):
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iomanip.h>
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#define IMAGE_NAME "background.jpg"
int main(int argc)
{
int back_width, back_height;
static GdkPixbuf *background;
background = gdk_pixbuf_new_from_file (IMAGE_NAME);
back_width = gdk_pixbuf_get_width (background);
back_height = gdk_pixbuf_get_height (background);
}
Thanks for your time.
--
Med venlig hilsen - Sincerely
Morten B. Pedersen - morten wtf dk
Copenhagen, Denmark.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]