Web lists-archives.com

Re: [Mingw-users] Using mingw's libpng?




On 05-Jul-2016 09:55, Eli Zaretskii wrote:
> You might be having a DLL hell.

Definitely some form of hell.

After installing a freshly built libpng12 into /usr/local I was able to 
get this to work:

gcc -Wall -o png-test libpng-short-example.c  
-I/usr/local/include/libpng12 -L/usr/local/lib -lpng12 -lz -lm

but not this

gcc -Wall -o png-test libpng-short-example.c  
-I/c/progs/mingw/include/libpng16  -lpng16 -lz -lm

However, the program I really care about, which is PyMOL, doesn't run 
when linked
with libpng12 either.

The more I look at this the more I think that it is somehow related to 
threaded vs. nonthreaded versions of the libraries as invoked by Python 
when PyMOL runs.
A version of libpng16 was built with "-mthreads" set for both compile 
and link.
Unfortunately it failed in the same place.  In Visual Studio (which I 
don't have)
they discuss the threaded flags:

https://msdn.microsoft.com/en-us/library/aa278396%28v=vs.60%29.aspx

Sadly I don't know how to examine a dll made by MingW to see what 
corresponds to what for these threaded configurations.  Unless somebody 
can tell me how to get gdb to attach to a dll started by Python I may 
have to track this problem down with print statements in a test dll to 
find where it is going wrong.

It is really hard to know which libraries are actually being used since 
there isn't a single binary produced which can be viewed with Dependency 
Walker.  For all I know Python may be picking up a libPNG from somewhere 
I don't even know about during the run time.

Thanks,

David Mathog
mathog@xxxxxxxxxxx
Manager, Sequence Analysis Facility, Biology Division, Caltech


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe