You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Xcode 15 introduced a new linker (see the Xcode 15 release notes). Apparently with this linker it is no longer necessary to explicitly link the C++ standard library runtime. If you do add the -lc++ linker flag, though, then the linker emits the warning above.
Apparently somewhere, somehow, the project seems to pick up the -lc++ flag.
Analysis
The project itself no longer sets the -lc++ linker flag, but it inherits this flag from the generated CocoaPods project. It is currently not clear why CocoaPods sets the -lc++ flag, but in any case the flag can be found in the various generated .xcconfig files. Search for the flag like this:
$ grep -ri -- c++ Pods | grep -- -l | cut -d":" -f1 | sort | uniq
Pods/Target Support Files/Pods-All Targets-Little Go/Pods-All Targets-Little Go.debug.xcconfig
Pods/Target Support Files/Pods-All Targets-Little Go/Pods-All Targets-Little Go.distribute_adhoc.xcconfig
Pods/Target Support Files/Pods-All Targets-Little Go/Pods-All Targets-Little Go.distribute_appstore.xcconfig
Pods/Target Support Files/Pods-All Targets-Little Go/Pods-All Targets-Little Go.release.xcconfig
Pods/Target Support Files/Pods-All Targets-Unit tests/Pods-All Targets-Unit tests.debug.xcconfig
Pods/Target Support Files/Pods-All Targets-Unit tests/Pods-All Targets-Unit tests.distribute_adhoc.xcconfig
Pods/Target Support Files/Pods-All Targets-Unit tests/Pods-All Targets-Unit tests.distribute_appstore.xcconfig
Pods/Target Support Files/Pods-All Targets-Unit tests/Pods-All Targets-Unit tests.release.xcconfig
Example line from one of the files:
OTHER_LDFLAGS = $(inherited) [...] -l"c++" [...]
Status / Workaround
The linker warning is nothing serious and can effectively be ignored.
To get rid of the warning temporarily you can manually edit the .xcconfig files and remove the -l"c++".
The text was updated successfully, but these errors were encountered:
A standard build of this project with Xcode 15 generates the following warning:
What does the warning mean?
Xcode 15 introduced a new linker (see the Xcode 15 release notes). Apparently with this linker it is no longer necessary to explicitly link the C++ standard library runtime. If you do add the
-lc++
linker flag, though, then the linker emits the warning above.Apparently somewhere, somehow, the project seems to pick up the
-lc++
flag.Analysis
The project itself no longer sets the
-lc++
linker flag, but it inherits this flag from the generated CocoaPods project. It is currently not clear why CocoaPods sets the-lc++
flag, but in any case the flag can be found in the various generated.xcconfig
files. Search for the flag like this:Example line from one of the files:
Status / Workaround
The linker warning is nothing serious and can effectively be ignored.
To get rid of the warning temporarily you can manually edit the
.xcconfig
files and remove the-l"c++"
.The text was updated successfully, but these errors were encountered: