Command Line Tools

RSS for tag

Command line tools allow for easy installation of open source software or development on UNIX within Terminal.

Command Line Tools Documentation

Posts under Command Line Tools tag

122 Posts
Sort by:
Post not yet marked as solved
11 Replies
27k Views
I have this problem: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun "make all" terminated with exit code 1. Build might be incomplete. Could someone help me? Two days ago I installed the last software update to MacOS: 12.2.1 but I haven't installed the command line for Xcode cause I'm not using Xcode for programming. Could this be the problem? Thanks for the support.
Posted
by
Post marked as solved
2 Replies
1.9k Views
I'm writing a command line tool for macOS which interfaces with BLE devices. I have a problems with regards to permissions: If I launch my tool on the command line, it gets killed by the OS. Only if I launch it via the debugger, I get the alerter to allow the bluetooth permission. My plist that contains the NSBluetoothAlwaysUsageDescription key is embedded as __TEXT __info_plist in the binary. Is this no longer enough for a command-line tool to access security-guarded OS facilities these days?
Posted
by
Post not yet marked as solved
1 Replies
995 Views
Hello, I'm keeping on getting a failure when trying to install an App from Samsung Dex. The report says to "disconnect your phone to install" but NO phone is connected. I tried various command line and numerous troubleshooting to reset and refresh some KEXT but still issue exists. Here is the install.log below. What could be the work around this bug? How to reset and proceed with installation? Thank you p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px 'Helvetica Neue'; color: #262626; -webkit-text-stroke: #262626; background-color: #ffffff} span.s1 {font-kerning: none} 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: @(#)PROGRAM:Install  PROJECT:Install-1000 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: @(#)PROGRAM:Installer  PROJECT:Installer-1020 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Hardware: iMac18,2 @ 3.00 GHz (x 4), 32768 MB RAM 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Running OS Build: macOS 11.4 (20F71) 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: USER=KP 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: __CFBundleIdentifier=com.apple.installer 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: COMMAND_MODE=unix2003 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: LOGNAME=KP 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.LsIZhGSQv0/Listeners 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: SHELL=/bin/zsh 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: HOME=/Users/KP 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: TMPDIR=/var/folders/d_/hqzchb455m9ct55v66n3n2_w0000gn/T/ 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: XPC_SERVICE_NAME=application.com.apple.installer.1152921500312163432.1152921500312163437 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Env: XPC_FLAGS=0x0 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Samsung DeX  Installation Log 2021-07-08 19:33:08-04 KPs-iMac Installer[9137]: Opened from: /Volumes/Samsung DeX/Install Samsung DeX.pkg 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Package Authoring Error: <background_scaling> has an unsupported MIME type: X-NSObject/NSNumber 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Package Authoring Error: <background_alignment> has an unsupported MIME type: X-NSObject/NSNumber 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Package Authoring Error: has an unsupported MIME type: X-NSObject/NSNumber 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Failed to load specified background image 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Product archive /Volumes/Samsung DeX/Install Samsung DeX.pkg trustLevel=350 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: External component packages (2) trustLevel=350 2021-07-08 19:33:09-04 KPs-iMac Installer[9137]: Could not load resource readme: (null) 2021-07-08 19:33:16-04 KPs-iMac Installer[9137]: Installation checks failed. 2021-07-08 19:33:16-04 KPs-iMac Installer[9137]: Installation check failure.  . Disconnect your phone to install..
Posted
by
Post not yet marked as solved
2 Replies
1.8k Views
When using the command open in the terminal, there seems to be this weird issue/behavior where if run to open a specific application (in this case Safari) where my current default browser is Chrome, the following command would open up in both Safari and my default browser. open -a /Application/Safari.app/ https://www.google.com Opening up a different browser, such as Firefox does not have this issue. In that case, only the specified application does run as expected. open -a /Application/Firefox.app/ https://www.google.com open -a Firefox https://www.google.com Is this a bug or a desired effect? (Tested macOS 11.4)
Posted
by
Post not yet marked as solved
7 Replies
2.8k Views
We are having an issue when trying to view the the coveage report in our "merged result bundle" Running xccov view --report --only-targets merged.xcresult results in: 09:52:54 Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load coverage archive in scheme action '(null)' in result bundle" UserInfo={NSLocalizedDescription=Failed to load coverage archive in scheme action '(null)' in result bundle, NSUnderlyingError=0x7f8ff8714f30 {Error Domain=NSCocoaErrorDomain Code=260 "The file “Metadata.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/tmp/action.xccovarchive/Metadata.plist, NSUnderlyingError=0x7f8ff8714930 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}} Checking the man page for xccov I was inspired by the idea of extracting the coverage report from the result bundle to try to understand or work around our error. The man xccov page states that If xccov is passed a result bundle directly, it will extract the report or archive implicitly, as part of the action being requested. Alternatively, the raw report/archive files can be extracted from the result bundle using xcresulttool(1) and subsequently passed to xccov. Checking man xcresulttool and trying out some stuff randomly I was not able to learn how a person might: Given an xcresult bundle use xcresulttool to create/extract an xccovreport bundle.
Posted
by
Post not yet marked as solved
9 Replies
1.8k Views
I have created a command line application with Xcode, the application acquires permissions to capture screen (for example) however then I would like to remove only it with the command tccutil reset All [bundler id] the problem is that my executable seems to have no bundler id and I don't know how to remove it. I have also modified the Product Bundle Identifier option in the Build Settings tab but this didn't work either.
Posted
by
Post not yet marked as solved
13 Replies
5.5k Views
Since 8.2p1 OpenSSH support for FIDO/U2F hardware authenticators, add "ed25519-sk" and "ecdsa-sk" key type. macOS Monterey 12.2 bundled OpenSSH (version: 8.6p1) doesn't include built-in security keys support, but it seems that user can specify middle ware library to use FIDO authenticator-hosted keys (see man ssh-add, man ssh_config and man ssh-agent). I try to implement FIDO security key provider library, but bundled ssh-agent seems don't try to load the implemented library and simply return with "unknown or unsupported key type": $ ssh-agent -d -P "/*" SSH_AUTH_SOCK=SOME_VALUE; export SSH_AUTH_SOCK; echo Agent pid SOME_VALUE; debug1: new_socket: type = SOCKET debug2: fd 3 setting O_NONBLOCK debug1: new_socket: type = CONNECTION debug3: fd 4 is O_NONBLOCK debug1: process_message: socket 1 (fd=4) type 25 debug2: process_add_identity: entering debug1: parse_key_constraint_extension: constraint ext sk-provider@openssh.com debug1: process_add_identity: add sk-ssh-ed25519@openssh.com SHA256:KEY_HASH "KEY_COMMENT" (life: 0) (confirm: 0) (provider: /path/to/libsk-libfido2.so) debug1: new_socket: type = CONNECTION debug3: fd 4 is O_NONBLOCK debug1: process_message: socket 1 (fd=4) type 11 debug2: process_request_identities: entering debug1: process_message: socket 1 (fd=4) type 13 debug1: process_sign_request2: entering Confirm user presence for key ED25519-SK SHA256:KEY_HASH process_sign_request2: sshkey_sign: unknown or unsupported key type User presence confirmed Manually install OpenSSH from third-party (such as MacPorts/Homebrew, or simply build it from source code) works, but third-party OpenSSH can't read passwords stored in Keychain. Is bundled OpenSSH disable hardware key support at build time? Advice most appreciated. Thank you!
Posted
by
Post not yet marked as solved
4 Replies
2.2k Views
HI devs, help me please, i want to debug Big Sur kernel on inter-based macbook from Monterey on m1, i have installed KDK_11.6.4_20G417.kdk in Monterey system on m1 macmini, then launch lldb, have created target and got this message : WARNING! Python version 3 is not supported for xnu lldbmacros. (lldb) target create /Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel warning: 'kernel' contains a debug script. To run this script in this debug session:   command script import "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/kernel.py" To run all discovered debug scripts in this session:   settings set target.load-script-from-symbol-file true Current executable set to '/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel' (x86_64). (lldb) settings set target.load-script-from-symbol-file true ############################## WARNING! Python version 3 is not supported for xnu lldbmacros. Please restart your debugging session with the following workaround defaults write com.apple.dt.lldb DefaultPythonVersion 2 ############################## Loading kernel debugging from /Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/kernel.py LLDB version lldb-1300.0.42.3 Swift version 5.5.2-dev settings set target.process.python-os-plugin-path "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/core/operating_system.py" settings set target.trap-handler-names hndl_allintrs hndl_alltraps trap_from_kernel hndl_double_fault hndl_machine_check _fleh_prefabt _ExceptionVectorsBase _ExceptionVectorsTable _fleh_undef _fleh_dataabt _fleh_irq _fleh_decirq _fleh_fiq_generic _fleh_dec command script import "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/xnu.py" error: module importing failed: Traceback (most recent call last):  File "<string>", line 1, in <module>  File "/Library/Developer/KDKs/KDK_11.6.4_20G417.kdk/System/Library/Kernels/kernel.dSYM/Contents/Resources/Python/lldbmacros/xnu.py", line 123   print "Execution interrupted by user"      ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Execution interrupted by user")? settings set target.process.optimization-warnings false How can i solve this problem? lldb linked with python 3, but kdk uses python 2, also command line tools version 12.5.1 which uses python 2 i can not install on monterey too.
Posted
by
Post not yet marked as solved
2 Replies
1.5k Views
I am attempting to build an AR app using Storyboard and SceneKit. When I went to run an existing app I have already used it runs but nothing would happen. I thought this behavior was odd so I decided to start from scratch on a new project. I started with the default AR project for Storyboard and SceneKit and upon run it immediately fails with an unwrapping nil error on the scene. This scene file is obviously there. I am also given four build time warnings: Could not find bundle inside /Library/Developer/CommandLineTools failed to convert file with failure reason: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0] Conversion failed, will simply copy input to output. Copy failed file:///Users/kruegerwilliams/Library/Developer/Xcode/DerivedData/ARtest-bjuwvdjoflchdaagofedfxpravsc/Build/Products/Debug-iphoneos/ARtest.app/art.scnassets/ship.scn -> file:///Users/kruegerwilliams/Library/Developer/Xcode/DerivedData/ARtest-bjuwvdjoflchdaagofedfxpravsc/Build/Products/Debug-iphoneos/ARtest.app/art.scnassets/ship.scn error:Error Domain=NSCocoaErrorDomain Code=516 "“ship.scn” couldn’t be copied to “art.scnassets” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/Users/kruegerwilliams/Library/Developer/Xcode/DerivedData/ARtest-bjuwvdjoflchdaagofedfxpravsc/Build/Products/Debug-iphoneos/ARtest.app/art.scnassets/ship.scn, NSUserStringVariant=( I currently am unsure how to fix these errors? It appears as if they must be in the command line tools because after moving the device support files back to a stable version of Xcode the same issue is present. Is anyone else having these issues?
Posted
by
Post not yet marked as solved
3 Replies
1.4k Views
Hello, When exporting a time CPU profiling .trace with xctrace export --output foo.xml --input PATH/TO/TRACE/FILE.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="time-sample"] , I am unable to reconstruct the full callstack/backtrace, despite the GUI doing so. Sample row: <row> <sample-time id="22" fmt="00:00.039.455">39...</sample-time> <thread ref="2"/> <process ref="4"/> <core ref="14"/> <thread-state ref="8"/> <weight ref="9"/> <backtrace id="23" fmt="test::test::foo ← (11 other frames)"> <process ref="4"/> <text-addresses id="24" fmt="frag 1732">4331406713 4331406716</text-addresses> <process ref="4"/> <text-addresses id="25" fmt="frag 1733">4331403 ...</text-addresses> </backtrace> </row> As you can see the backtrace is cropped "(11 other frames)", but according to the backtrace documentation: In extended views, the entire symbolicated backtrace is listed. So how to export that extended view? Alternatively, is it possible to symbolicate the backtrace using the text-addresses list? That question was asked a year ago without answer so far. Best regards
Posted
by
Post not yet marked as solved
2 Replies
3.6k Views
I am having a framework that I am building using a buildscript using xcodebuild. The framework archives for all architectures required so that it can be used in another Xcode project. However, since I have installed Xcode 14, the build script gives an error when I am building for iOS Simulator. I do need to build the framework for iOS simulator as well so that developers can test their app that use the framwework on an iOS simulator. The command line to archive the framework for iOS Simulator is: xcodebuild archive -scheme <TargetName> -destination 'generic/platform=iOS Simulator' -archivePath <ArchivePath> SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES The error I am getting is: xcodebuild: error: Unable to find a destination matching the provided destination specifier: { generic:1, platform:iOS Simulator } This works well for all other destinations I am building the framework for (watchOS, iOS, watchOS Simulator), just not for iOS Simulator In the output of xcodebuild is shows the available platforms. Among all the specific Simulators that are available, it also has a 'generic' entry for the 'watchOS Simulator' destination: { platform:watchOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-watchsimulator:placeholder, name:Any watchOS Simulator Device An equivalent entry is not available in the list for 'iOS Simulator' as you can see in the output of xcodebuild below. Is this the problem I am facing and should there be a similar 'Any iOS Simulator Device' entry in this list? And if this is the problem, how can I add a generic 'iOS Simulator'? If not, what could be the problem instead? For complete information, this is the full output of the xcodebuild command: Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild archive -scheme <SCHEME> -destination "generic/platform=iOS Simulator" -archivePath Archiver/<archive-name>.xcarchive SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES User defaults from command line: IDEArchivePathOverride = /<directory>/<archive-name>.xcarchive IDEPackageSupportUseBuiltinSCM = YES Build settings from command line: BUILD_LIBRARIES_FOR_DISTRIBUTION = YES SKIP_INSTALL = NO 2022-10-03 16:18:52.358 xcodebuild[17449:3179785] Writing error result bundle to /var/folders/lj/n7mj7ccd3dd4fds0x_0jh0w00000gn/T/ResultBundle_2022-03-10_16-18-0052.xcresult xcodebuild: error: Unable to find a destination matching the provided destination specifier: { generic:1, platform:iOS Simulator } Available destinations for the <scheme-name> scheme: { platform:macOS, arch:x86_64, variant:Mac Catalyst, id:41E4E96D-C631-58DB-8E17-3556BF095CE6 } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } { platform:macOS, variant:Mac Catalyst, name:Any Mac } { platform:watchOS, id:dvtdevice-DVTiOSDevicePlaceholder-watchos:placeholder, name:Any watchOS Device } { platform:watchOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-watchsimulator:placeholder, name:Any watchOS Simulator Device } { platform:watchOS Simulator, id:85EAEDB9-281C-4C42-BB07-D381344B4F01, OS:9.0, name:Apple Watch SE (44mm) (2nd generation) } .... And more specific Simulator devices as configured in Xcode .... { platform:iOS Simulator, id:CC7BF3A6-62CB-4AC3-9E13-ED20DA1CC9E0, OS:16.0, name:iPhone SE (3rd generation) }
Posted
by
Post not yet marked as solved
3 Replies
2.5k Views
On macOS 12.6 Monterey with Xcode 14.0.1 and FileMerge 2.11 (21012). I am not seeing identical files grayed out. The font color (black) is the same shade as those files that are different. Wondering if there is some setting with my account or with my macOS customizations since receiving this new M1 Max MacBook Pro in July 2022. I don't recall it ever working on this MacBook. I have compared my FileMerge preferences as well as my user account customizations with that of older MacBook running macOS 11.x Big Sur. Works just fine on Intel MBP on previous macOS and with older versions of Xcode.
Posted
by
Post not yet marked as solved
5 Replies
1.8k Views
We have an Apple ID that has access to around 140 Apple Developer Accounts. When our automated build server was forced to update to iTMSTransporter version 3.0 our uploads stopped working for most accounts. We are setting -asc_provider parameter and have appropriate access to all the accounts. It appears to fail when looking up the provider public id given the asc_provider. I've found 2 accounts so far that it does work for and have not been able to figure out what the pattern is for this. Has anyone else run into this issue with this version of iTMSTransporter?
Posted
by
Post not yet marked as solved
6 Replies
4.3k Views
Hi, I am a student and I wanted to include &lt;bits/stdc++.h&gt; file in my code so that it will help me avoid including many files in my program to save time during competitive programming, but while including above file in my program, it gives error "file not found", since clang++ do not have it present by default, so I want to add it manually. Please help me fix the issue. I already added bits folder at this location : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 following which I also created stdc++.h file but still error persists!!. I also made bits folder with stdc++.h file at this location too : /Library/Developer/CommandLineTools/usr/include/c++/v1 but again couldn't fix the error!! I also made respective changes in Homebrew folder (to fix it in g++ too, but again couldn't fix it!!)
Posted
by
Post not yet marked as solved
1 Replies
610 Views
I'm new to this platform and not sure whether what I'm reporting is a bug or not. But this is the issue I'm encountering. I had a special character(Â) which gave error while using sed. echo $'H\xc3\x82Bnc' | sed -E 's/[A-Z]*/`&`/g' sed: RE error: illegal byte sequence $ locale LANG="" LC_COLLATE="C" LC_CTYPE="UTF-8" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= Now if I set LC_COLLATE, then the command works. echo $'H\xc3\x82Bnc' | LC_COLLATE="en_US.UTF-8" sed -E 's/[A-Z]*/`&`/g' `HÂB`n``c`` Is LC_COLLATE affecting the character range. Why after LC_COLLATE was set, did the code produce no error of illegal byte sequence? I'm using Mac OS 13.1
Posted
by
Post not yet marked as solved
6 Replies
2.7k Views
Hi, as Xcode 14.3 dropped Rosetta 2 Support and added a run option directly in Xcode 14.3 (Rosetta Simulators), I wondered how I can trigger a build for a i.e. iPhone 14 Pro (Rosetta) via CLI. I already checked the man page of xcbuild and xcrun. xcrun simctl list also outputs only the simulators and the device IDs which brings me to the assumption that the building and running for Rosetta is a parameter/flag set by Xcode. But which and where? Happy for any sort of help, resource, or hint.
Posted
by
Post not yet marked as solved
0 Replies
637 Views
I am facing a issue while generating build using command line script in Xcode 14, the same script is working with Xcode 13. Please find the script # archieve the build ARCHIEVE_PATH="$BUILD_DIR/${ASSET_BASENAME}/$EXPORT_METHOD/${PRODUCT_NAME}.xcarchive" (xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration "$CONFIGURATION" -destination 'generic/platform=iOS' -archivePath "$ARCHIEVE_PATH" clean archive 1> /dev/null || xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration "$CONFIGURATION" -destination 'generic/platform=iOS' -archivePath "$ARCHIEVE_PATH" clean archive || failed "XCode failed to build app") and I am getting following on the Jenkins console ` /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace BroughSuperior.xcworkspace -scheme BroughSuperior -configuration Release -destination generic/platform=iOS -archivePath "administrator/testing-app5_ios_2023-05-05-10:10:33/enterprise/testing-app5.xcarchive" clean archive User defaults from command line: IDEArchivePathOverride = /Users/administrator/.jenkins/jobs/iOS Bruff dev/workspace/BroughSuperior/administrator/testing-app5_ios_2023-05-05-10:10:33/enterprise/testing-app5.xcarchive IDEPackageSupportUseBuiltinSCM = YES` Please help I can not use Xcode 13 now, since apple has stopped taking builds from Xcode 13. And the same command works in Xcode 13. Please help this is very urgent. An early response is much appreciated.
Posted
by
Post marked as solved
1 Replies
1k Views
I am trying to test an app locally that has managed configurations, using the xcrun simctl command line tools. I am passing my config as a json array to the com.apple.configuration.managed but continually receive the error 'Could not parse: Try single-quoting it'. I have validated the json is correct. See redacted command below: xcrun simctl spawn booted defaults write com.app.bunleID com.apple.configuration.managed '{"apiKey":"xxxxxxxxx", "clientId":"xxxxxxxx", "clientSecret":"xxxxxxxx", "domainName":"xxxxxxx", "isPlaceOs":false}'
Posted
by
Post not yet marked as solved
3 Replies
1.6k Views
I'm trying to run the program below on my M1 Pro MacBook Pro from the command line, but I am getting linker errors. Also, I do not want to use XCode, I like to develop in vim in my terminal and want to develop in the terminal rather than XCode. #include <iostream> #include <string> inline void print_string(std::string s = "Hello World!") { std::cout << s << std::endl; } int main() { print_string(); } The above program generates these errors: Undefined symbols for architecture arm64: "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from: std::__1::ctype<char> const& std::__1::use_facet<std::__1::ctype<char> >(std::__1::locale const&) in hello_world-fcbd23.o "std::__1::ios_base::getloc() const", referenced from: std::__1::basic_ios<char, std::__1::char_traits<char> >::widen(char) const in hello_world-fcbd23.o "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long)", referenced from: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string<std::__1::nullptr_t>(char const*) in hello_world-fcbd23.o "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(unsigned long, char)", referenced from: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(unsigned long, char) in hello_world-fcbd23.o "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from: _main in hello_world-fcbd23.o std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in hello_world-fcbd23.o "std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello_world-fcbd23.o "std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello_world-fcbd23.o "std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello_world-fcbd23.o "std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello_world-fcbd23.o "std::__1::cout", referenced from: print_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in hello_world-fcbd23.o "std::__1::ctype<char>::id", referenced from: std::__1::ctype<char> const& std::__1::use_facet<std::__1::ctype<char> >(std::__1::locale const&) in hello_world-fcbd23.o "std::__1::locale::~locale()", referenced from: std::__1::basic_ios<char, std::__1::char_traits<char> >::widen(char) const in hello_world-fcbd23.o "std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello_world-fcbd23.o "std::__1::ios_base::clear(unsigned int)", referenced from: std::__1::ios_base::setstate(unsigned int) in hello_world-fcbd23.o "std::terminate()", referenced from: ___clang_call_terminate in hello_world-fcbd23.o "___cxa_begin_catch", referenced from: ___clang_call_terminate in hello_world-fcbd23.o std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello_world-fcbd23.o "___cxa_call_unexpected", referenced from: std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::failed() const in hello_world-fcbd23.o std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::ostreambuf_iterator(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello_world-fcbd23.o "___cxa_end_catch", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello_world-fcbd23.o "___gxx_personality_v0", referenced from: _main in hello_world-fcbd23.o std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello_world-fcbd23.o std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in hello_world-fcbd23.o std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::failed() const in hello_world-fcbd23.o std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::ostreambuf_iterator(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello_world-fcbd23.o std::__1::basic_ios<char, std::__1::char_traits<char> >::widen(char) const in hello_world-fcbd23.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) If I run c code with gcc it works, but for some reason this c++ code isn't working. Is there a fix for this that does not require me to use Xcode?
Posted
by