Re: Incompatibilities between home-compiled and apple's libpng
Re: Incompatibilities between home-compiled and apple's libpng
- Subject: Re: Incompatibilities between home-compiled and apple's libpng
- From: "D. Walsh" <email@hidden>
- Date: Wed, 12 Oct 2005 17:58:36 -0400
- Mta-interface: amavisd-new-2.3.3 (20050822) at daleenterprise.com
On Oct 11, 2005, at 06:09 , Damien Bobillot wrote:
Peter O'Gorman wrote :
D. Walsh wrote:
This doesn't work by mistake, it works because you are
repackaging a static library as a dynamic library and providing
the current and compatibility information.
There already was a dynamic shared library with the correct
current and compatibility versions though, making up different
numbers to solve the problem is not right, I feel.
The OP stated the current/compatable version to be 0.1.2 which is
incorrect version information.
Alternatively you can download libpng 1.2.7, copy png.h to your project.
Now you have the headers for the installed version of libpng.
If you experience problems locating and using the library adjust your
code to use -lPng instead of -lpng but probably advisable to use the
corresponding framework.
Once your application is built, you wont have to worry about the
png.h header file.
The same can be said for libTiff, libGIF, libJPEG and libJP2.
The existing library with the same name cannot be used, because it
does not export the same symbols. So I MUST compile my own version
of the libpng.
Only because the header file is missing.
Meanwhile, I've found an obvious solution to my problem : just
adding the static lib libpng.a to my project... (300Ko is not so
much).
Yes this is also an acceptable solution.
The real issue is that Apple uses the opensource libpng library,
but don't export the png_* symbols. So it's impossible to use this
library in our programs without any hacks. Why Apple don't
make it publicly available ? (may be off topic...)
As a test, I removed all instances of built libpng's, I compiled PHP5
with GD using the Apple installed libPng.dylib and the png.h file, I
have no difficulties using ilibpng functions.
I do have web scripts that build tabs from 3 - 7X11 png images which
are stretched and joined, text added that seems to work so I'd have
to conlcude that it's very possible to utilize existing libraries
without adding additional ones if you're willing to do the extra work
required.
Here's the PHP using Apple's libPng.dylib
http://www.daleenterprise.com/info.php
Here's a page using the libPng functions.
http://www.daleenterprise.com/amavis-stats.php
Anyway, I think the original poster has DYLD_LIBRARY_PATH set
somewhere to be getting this behavior.
I do. However, if I put my library in /usr/lib, I don't need
DYLD_LIBRARY_PATH anymore. So my problem has nothing to do with
DYLD_LIBRARY_PATH.
You don't need to put your library in /usr/lib for it to be useable
and I've never been a fan of playing with DYLD_LIBRARY_PATH when you
have libraries scattered all over the place.
--
Damien Bobillot
-- Dale
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden