Skip to content

Thad writes blogs

this is a lot more work than i expected

Menu
  • About
  • Pin Posts
Menu

libpng on a fresh os x install

Posted on January 12, 2023January 12, 2023 by Thad

Goal: You have a brand new install of macOS Ventura (say 13.1) and you have some C/C++ software you need to compile.

You have cloned it with git, installing the Xcode command line tools when promoted, and you have run make. The result: fatal error: 'png.h' file not found

Solution:

Install brew, see: https://brew.sh, then:

brew install libpng
brew link libpng
sudo ln -s /opt/homebrew/include /usr/local/include
sudo ln -s /opt/homebrew/lib /usr/local/lib 

This wasn’t obvious to me and took me a little while to figure so I though it might help others to share the solution I found.

Further reading about the location of those symlinks: https://stackoverflow.com/questions/36730549/cannot-create-a-symlink-inside-of-usr-bin-even-as-sudo

Is this the right way? Is there a better way? Let me know!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • October 2024
  • January 2023
  • December 2022
  • November 2022

Categories

  • Food
  • meta
  • Uncategorized
© 2025 Thad writes blogs | Powered by Minimalist Blog WordPress Theme