I have looked at /System/Library, but I have not found the iostream library/module by
ack iostream
Where are the standard libraries in OS/X?
在 OS X 10.10 Yosemite 上,它们位于:
/usr/include/c++
Please make sure you have XCode installed first.
Without xcode you won't be able to develop C/C++ applications since xcode includes all linkable standard libraries and headers.
iostream是一个C ++的东西,而不是C.如果你适当地重新标记你的问题,你可能会得到更多的帮助。
for me it is under the Xcode library directory: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/.
My OS is Catalina.
Apple keeps moving it. To see the current location, run
xcrun --show-sdk-path
On Big Sur the location is:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
IIRC, /usr/local/lib ... Try adding -L/usr/local/lib to your GCC build options. Although the stdc++ libraries should be in your linker path already. Compiler errors usually indicate missing headers / syntax error while linker errors indicate missing binary blobbage.
在 macOS MOJAVE 10.14 上,它位于:
usr/local/include/c++/
试试 /usr/lib/ 或 /usr/local/lib/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.