0

I'm trying to build gtk+1.3 on ubuntu and I'm getting an error during configure,

ld: cannot find -lpango

I tried installing a ton of pango libraries and its still not installed so I'm not sure what to do. I keep testing it with

ld -lpango

But get the same error. Has anyone successfully installed a pre-built pango on ubuntu? From any repos? Pango website says its difficult to build and I'd like to use a prebuilt binary if possible.

Also I had an error with atk not being found but all I had to do was install libatk1.0* and that was fixed.

shwick
  • 4,277
  • 6
  • 21
  • 28
  • Did you install `libpango1.0-dev`? – andlabs Jul 17 '15 at 16:53
  • libpango1.0-dev is already the newest version yep. I think I did libpango1.0*, I did the graphite one, and I did another package that was supposed to contain pango, some grl one. – shwick Jul 17 '15 at 18:12

1 Answers1

1

-lpango is not the correct library name.

In fact, you should not be using -l options directly to link against Pango. Instead, you should be using pkg-config:

gcc -c -o program.o program.c `pkg-config --cflags pango`
gcc -o program program.o `pkg-config --libs pango`

Or

gcc -o program program.c `pkg-config --cflags --libs pango`

Since this is debugging a broken configure script, you can run pkg-config directly to see what it should be:

$ pkg-config --libs pango
-lpango-1.0 -lgobject-2.0 -lglib-2.0 

Frankly I'm surprised GTK+'s configure file doesn't also do this; you should file a bug report.

andlabs
  • 11,290
  • 1
  • 31
  • 52