Skip to content

Instantly share code, notes, and snippets.

@labspc
labspc / find_sdk_root.sh
Created March 30, 2024 06:30 — forked from Evian-Zhang/find_sdk_root.sh
Proper way to handle "ld: library not found for -lSystem" in macOS
SDKROOT=`/usr/bin/xcrun --show-sdk-path -sdk macosx`
as test.s -o test.o
ld test.o -lSystem -L $(SDKROOT)/usr/lib -o test