我在我的MacOS上安裝了clang(位於/ usr/bin/clang),我認爲它默認安裝在Mac上,但是,當我嘗試在腳本中包含clang頭文件時,它說沒有找到它們如何安裝clang頭文件?
Example.cpp:1:10: fatal error: 'clang/Driver/Options.h' file not found
問:是否有必要(和可能,如果是這樣,如何)安裝頭文件時鐺已經安裝並內置MacOS的系統(或者根本鐺本身需要在同一時間全部重新安裝所需的開發工具包和它們的頭文件被安裝)?
#include "clang/Driver/Options.h"
#include "clang/AST/AST.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Frontend/ASTConsumers.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Tooling/CommonOptionsParser.h"
#include "clang/Tooling/Tooling.h"
#include "clang/Rewrite/Core/Rewriter.h"
您需要安裝clang開發包以獲取各種工具頭。 –
特別是,通過自制軟件安裝llvm可能是必要的(無法確認) – jwimberley
@ G.M。好的謝謝。是否可以安裝這些軟件包以配合Mac O.S.安裝的叮噹聲。系統(或者它們是否需要與clang同時安裝? – Leahcim