I've been looking around for quite a while, but I haven't quite been able to hit on a source answering my question. I want to use PNGs with Allegro. I know about libpng and loadpng for Allegro, but I don't know what to do with these. Obviously, I'm new to this. Can anyone explain to me how to download these resources, where to put them, how to link to them, and possibly how to use them. I think I should be able to figure out how to use them once everything is set up. I'm using g++, Ubuntu 12.04, Allegro 4.2.2.
Asked
Active
Viewed 366 times
1 Answers
1
If you're on ubuntu, you're looking at the libpng12-dev or libpng++-dev libraries for libpng and the liballegro4.2-dev package for allegro. Then just use pkg-config for the actual compilation: g++ alleg.cpp -o alleg pkg-config --cflags --libs allegro
I've also seen a program called allegro-config used, but I'm not familiar with its operation.

Robert Mason
- 3,949
- 3
- 31
- 44
-
All the `*-config` programs essentially work the same way, i.e. they have `--cflags` and `--libs` options which makes them produce the required compiler and linker options, respectively. – Kerrek SB Aug 30 '12 at 22:42