libpng headaches!

2009-02-18 Thread David Karlgren
Hello dear Cygwin users, I hope I'm posting this to the right list. If 
not, then I sincerely apologize!


I'm programming a game using SDL and I compile with gcc under Cygwin and 
link with the mingw libraries. I've done this for years, and it has 
worked fine all the time. But a short time ago I wanted to start using 
libpng for my project. And this is where the nightmare starts


When I try to build my game with -lpng12 and -lz I get these two errors:

undefined reference to `_setjmp'

And:

undefined reference to `__imp___ctype_'

The last one occurs on a line in my code that calls toupper() or tolower().

I've been trying to research this as good as I can, and I've found some 
posts here and there with other people having similar problems. It 
appears as if libpng refuses to compile under Cygwin? For example, this 
is a comment I found at the OpenTTD website:


[...] at the moment I am not sure how to do this because the PNG 
packages for Cygwin don't work (you can include libpng and it's 
development headers and manually edit the Makefile.config to make it 
compile but it fails at linkage with undefined reference to __setjmp 
errors).


I guess the question I'd like to have answered is, what am I doing 
wrong? Thank you!


Best regards
David Karlgren

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: libpng headaches!

2009-02-18 Thread Larry Hall (Cygwin)

David Karlgren wrote:
Hello dear Cygwin users, I hope I'm posting this to the right list. If 
not, then I sincerely apologize!


I'm programming a game using SDL and I compile with gcc under Cygwin and 
link with the mingw libraries. 


So you're really using MinGW then.  The MinGW list would be the appropriate
place to look for help with this problem.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
 Q: Are you sure?
 A: Because it reverses the logical flow of conversation.
 Q: Why is top posting annoying in email?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: libpng headaches!

2009-02-18 Thread Dave Korn
Larry Hall (Cygwin) wrote:
 David Karlgren wrote:
 Hello dear Cygwin users, I hope I'm posting this to the right list. If
 not, then I sincerely apologize!

 I'm programming a game using SDL and I compile with gcc under Cygwin
 and link with the mingw libraries. 
 
 So you're really using MinGW then.  The MinGW list would be the appropriate
 place to look for help with this problem.
 

  And the problem is presumably caused by trying to use the Cygwin version of
libpng-devel, which will have references to functions supplied by the Cygwin
DLL, when linking against MinGW runtime libs, which don't supply the same set
of functions.

  The problem with -lz could probably be fixed by using the mingw-zlib
package, but David will need to find a proper MinGW build of libpng (or roll
his own).

cheers,
  DaveK


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: libpng headaches!

2009-02-18 Thread David Karlgren

Larry Hall (Cygwin) wrote:


David Karlgren wrote:

Hello dear Cygwin users, I hope I'm posting this to the right list. 
If not, then I sincerely apologize!


I'm programming a game using SDL and I compile with gcc under Cygwin 
and link with the mingw libraries. 



So you're really using MinGW then.  The MinGW list would be the 
appropriate

place to look for help with this problem.

Yes, I guess you're right. I was only using what was included with the 
Cygwin distribution, and I sort of figured they belonged to each other. 
But now I know where I should go from here. Thank you!


Best regards
David Karlgren

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/