[fpc-pascal]How to use Linux libraries?

Rainer Hantsch rainer at hantsch.co.at
Fri Jul 25 16:04:47 CEST 2003

On Fri, 25 Jul 2003, Michael Van Canneyt wrote:
| It uses some windows bitmap structures, and cannot be compiled on Linux as
| is. For the rest it compiles 100% fine. You could cut&paste the needed
| definitions from the windows unit and put them between {$ifndef
| win32}..{$endif}

So, in fact, the whole 'pasjpeg' does not exist at all, because converting
such a thing will require that knowledge which I currently do not have. The
only way to learn from source code is to analyze a _working_ one. It makes no
sense to analyze windows-dependent code when Linux code is (so I guess)
nearely the opposite -- otherwise it would not be so complicated to port
Windoze-Software to Linux...

So I return to my initial question in the hope that somebody has already done
such things...

What I need for my first steps, is some source code which compiles without any
change on Linux and uses Linux' shared libraries for reading/writing data
from/to image files in jpeg/gif/tif/... format.
I definitely prefer procedural and/or OOP style before Delphi Style, because
this is easier to understand and also matches better to my already existing

A good sample for doing first steps would be a program which reads a little
JPEG image into RAM, hereby decoding it into a simple structure (i.e. an array
of pixels, one for every color, so that I can get the RGB or CMYK values out
easily for every pixel.
Next step would be to store this structure back into a file.

With this two steps I can start. Nobody here who can help?

  Ing. Rainer Hantsch

More information about the fpc-pascal mailing list