Forum > C++ > "cannot find -lpng" Solution!

"cannot find -lpng" Solution!

By DevSilenti Posted 2011-10-27 09:48 Comments 1
DevSilenti
  • Posts: 8

Ok so after seeing this on the forum a few times and having run into the problem myself throughout development I finally took the time to figure out what is going on.

There are a series of “.a” files that should be in:

cocos2dx/platform/third_party/android/libraries/

The files are:

libcurl.a
libjpeg.a
libpng.a
libxml2.a

The issue seems to be that SVN (not sure about Git) simply does not see these files so they are never committed to the project. The simple solution is to just unzip a new copy of coco2d-x and grab the files and drop them in the right spot in your local copy.

I hope I was able to alleviate some frustration.

If anyone knows how to get SVN to see these files that would be very welcome!

walzer
  • Posts: 1735
  • Location: Xiamen, China

#1 RE: 2011-10-27 17:52

oops. I think the default setting of your SVN is to avoid committing build results / binaries to the server, such as .a .so .dll .lib are probably written in the filter.

In earlier versions of cocos2d-x, if people didn’t modify android.mk to set ndk version correctly, “cannot find -lpng” error would be raised too.

Less is More. Keep Focus.

Loggin to reply

Copyright © 2010 - 2013 Cocos2d-x.orgClustrmaps