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/