Closed djbpitt closed 3 years ago
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
from https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave
plus export MACOSX_DEPLOYMENT_TARGET=10.9
@bodak Thank you! Working now!
To summarize, I needed to:
export CPATH=/Library/Developer/CommandLineTools/usr/include/c++/v1
, as described in Nigel’s response at https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave.This error came back with the upgrade to macOS-Cataline in December 2019.
for macOS Catalina this worked for me:
export CPATH=/Library/Developer/CommandLineTools/usr/include/c++/v1
export CFLAGS=-stdlib=libc++
Thanks @peteriz those steps worked for me.
I could get those fixes to work for me, however making a single compilation unit did the trick. WIP PR is here: https://github.com/pytries/marisa-trie/pull/54
for macOS Catalina this worked for me:
- install command-line tools
export CPATH=/Library/Developer/CommandLineTools/usr/include/c++/v1
export CFLAGS=-stdlib=libc++
After 4 hours of struggle this saved my life. macOS Catalina 10.15.6
Have a look at #66 ;)
I don't know whether this is user error, a return of Issue #34, or something new (since #34 seems to have been closed as resolved), but I just tried and failed to build marisa-trie under MacOS Mojave. Details below.