質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
コンパイルエラー

コンパイルのフェーズで生成されるエラーです。よく無効なシンタックスやタイプが含まれているとき発生します。

C++

C++はC言語をもとにしてつくられた最もよく使われるマルチパラダイムプログラミング言語の1つです。オブジェクト指向、ジェネリック、命令型など広く対応しており、多目的に使用されています。

Q&A

解決済

1回答

526閲覧

ターミナルを使ったC++のコンパイルができない

jamboc

総合スコア16

コンパイルエラー

コンパイルのフェーズで生成されるエラーです。よく無効なシンタックスやタイプが含まれているとき発生します。

C++

C++はC言語をもとにしてつくられた最もよく使われるマルチパラダイムプログラミング言語の1つです。オブジェクト指向、ジェネリック、命令型など広く対応しており、多目的に使用されています。

0グッド

0クリップ

投稿2019/01/10 21:23

前提・実現したいこと

macのターミナルによるC++のコンパイル
久々にプログラミングやろうと思って以前作ったファイルをターミナルでコンパイルしようとしたら, 長文のエラーメッセージが出てきてどうすればいいのかわからなってしまいました.

発生している問題・エラーメッセージ

2019-01-11 06:20:51.183 xcodebuild[21419:4882922] [MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.IDE.DVTKitDFRSupport (/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin), error = Error Domain=NSCocoaErrorDomain Code=3588 "dlopen(/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin/Contents/MacOS/DVTKitDFRSupport, 265): Symbol not found: _OBJC_IVAR_$_NSTextViewIvars.sharedData Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit in /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit" UserInfo={NSLocalizedFailureReason=The bundle couldn’t be loaded., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin/Contents/MacOS/DVTKitDFRSupport, NSDebugDescription=dlopen(/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin/Contents/MacOS/DVTKitDFRSupport, 265): Symbol not found: _OBJC_IVAR_$_NSTextViewIvars.sharedData Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit in /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit, NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin, NSLocalizedDescription=The bundle “DVTKitDFRSupport” couldn’t be loaded.}, dyldError = dlopen(/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin/Contents/MacOS/DVTKitDFRSupport, 0): Symbol not found: _OBJC_IVAR_$_NSTextViewIvars.sharedData Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit in /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit 2019-01-11 06:20:51.183 xcodebuild[21419:4882922] [MT] DVTPlugInExtensionFaulting: Failed to fire fault for extension Xcode.DVTKitDFRSupport.Initializer: Error Domain=DVTPlugInErrorDomain Code=2 "Loading a plug-in failed." UserInfo={DVTPlugInIdentifierErrorKey=com.apple.dt.IDE.DVTKitDFRSupport, DVTPlugInExecutablePathErrorKey=/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin/Contents/MacOS/DVTKitDFRSupport, NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled., DVTPlugInDYLDErrorMessageErrorKey=dlopen(/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin/Contents/MacOS/DVTKitDFRSupport, 0): Symbol not found: _OBJC_IVAR_$_NSTextViewIvars.sharedData Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit in /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit, NSLocalizedDescription=Loading a plug-in failed., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin, NSLocalizedFailureReason=The plug-in “com.apple.dt.IDE.DVTKitDFRSupport” at path “/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin” could not be loaded. The plug-in or one of its prerequisite plug-ins may be missing or damaged., NSUnderlyingError=0x7fa2ba69d9e0 {Error Domain=NSCocoaErrorDomain Code=3588 "dlopen(/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin/Contents/MacOS/DVTKitDFRSupport, 265): Symbol not found: _OBJC_IVAR_$_NSTextViewIvars.sharedData Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit in /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit" UserInfo={NSLocalizedFailureReason=The bundle couldn’t be loaded., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin/Contents/MacOS/DVTKitDFRSupport, NSDebugDescription=dlopen(/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin/Contents/MacOS/DVTKitDFRSupport, 265): Symbol not found: _OBJC_IVAR_$_NSTextViewIvars.sharedData Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit in /Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit, NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/DVTKitDFRSupport.ideplugin, NSLocalizedDescription=The bundle “DVTKitDFRSupport” couldn’t be loaded.}}} ** INTERNAL ERROR: Uncaught exception ** Uncaught Exception: Error getting value for key 'initializationClass' of extension 'Xcode.DVTKitDFRSupport.Initializer' in plug-in 'com.apple.dt.IDE.DVTKitDFRSupport' Stack: 0 __exceptionPreprocess (in CoreFoundation) 1 objc_exception_throw (in libobjc.A.dylib) 2 -[DVTExtension valueForKey:error:] (in DVTFoundation) 3 _IDEInitializeOnePlugInAndPrerequisites (in IDEFoundation) 4 _IDEInitializePlugIns (in IDEFoundation) 5 IDEInitialize (in IDEFoundation) 6 -[Xcode3CommandLineBuildTool run] (in Xcode3Core) 7 0x0000000102d7a202 (in xcodebuild) 8 start (in libdyld.dylib) sh: line 1: 21423 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -find clang++ 2> /dev/null c++: error: unable to find utility "clang++", not a developer tool or in PATH

該当のソースコード

ソースコード

試したこと

特にないですが, 超簡単な絶対に問題ないコードもコンパイルできなかったのでコードには問題ないと思います.

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

scsi

2019/01/10 22:39

c++: error: unable to find utility "clang++", not a developer tool or in PATH と、書いてありますが、それについて何か調べましたか?
guest

回答1

0

ベストアンサー

XcodeとCommand Line Toolsを最新版にして下さい。

投稿2019/01/10 22:56

hichon

総合スコア5737

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

jamboc

2019/01/11 02:27

Xcodeアップデートしたら解決しました. ありがとうございます.
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問