Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

png.h file not found #11

Open
harry1080 opened this issue Feb 26, 2024 · 5 comments
Open

png.h file not found #11

harry1080 opened this issue Feb 26, 2024 · 5 comments

Comments

@harry1080
Copy link

image

@ldenoue
Copy link
Owner

ldenoue commented Feb 26, 2024

I think you get this file when you ./configure make.

@harry1080
Copy link
Author

harry1080 commented Feb 27, 2024

I think you get this file when you ./configure make.

I directly git clone from github to the local area, and then run ./configure, and the following error message appears, and then I cannot make.

image

And I didn’t see the file png.h in this warehouse. I saw many places referencing this header file, but I couldn’t find this file.

image

@ldenoue
Copy link
Owner

ldenoue commented Feb 27, 2024

Are you on a Mac by chance?
You need to install libpng separately and configure with extra parameters, as specified in the README.
./configure --with-libpng-library=/usr/local/Cellar/libpng/1.6.16/lib/ --with-libpng-includes=/usr/local/Cellar/libpng/1.6.16/include/ --with-freetype2-library=/usr/local/lib/ --with-freetype2-includes=/usr/local/include/freetype2/

@harry1080
Copy link
Author

./configure --with-libpng-library=/usr/local/Cellar/libpng/1.6.16/lib/ --with-libpng-includes=/usr/local/Cellar/libpng/1.6.16/include/ --with-freetype2-library=/usr/local/lib/ --with-freetype2-includes=/usr/local/include/freetype2/

I am using ubuntu. The specific model is as follows:

Linux 5.15.0-97-generic #107~20.04.1-Ubuntu SMP Fri Feb 9 14:20:11 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Based on your answer, I guessed that I was missing libpng, so I followed apt install libpng-dev

image

it succeeded. Thank you for your reply. I wish you a happy day.You can close this question.

@ldenoue ldenoue closed this as completed Feb 28, 2024
@ldenoue
Copy link
Owner

ldenoue commented Feb 28, 2024

@harry1080 it would be useful for other if you could share your .configure parameters after you installed libpng.
I would update the README.md file.

@ldenoue ldenoue reopened this Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants