Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
Clang linking error MacOS Big Sur
As suggested by @NavyOwl in the response - https://developer.apple.com/forums/thread/666700?answerId=648163022#648163022, adding the following compilation flag fixes the problem:
g++ ... -L /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
In order to make or cmake compile with this flag, one can define an environment variable (e.g., set in your IDE / bash):
bash
LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
If you are working from command line:
bash
export LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
make or cmake .