포함 - http://www.cs.bgu.ac.il/~mirskyil/CsWiki/Blogs/Post_Mirskyil_4c83cc1f85da2연타/LLVM 헤더 호 (우분투) 우분투 설치 LLVM와 연타를 받고 작업을하고 여기에서 몇 가지 튜토리얼 코드를 컴파일하려고 해요
g를 사용하여 컴파일 할 때 나는 몇 가지 문제로 실행 한을 ++ 나는 뭔가를 올바르게 설치하지 않았다는 사실과 관련이 있다고 가정 할 것입니다. (나는이 물건에 상당히 익숙하지 않습니다.) 나는 다음과 같은 오류가 나타날
g++ tut.cpp -g -o tut.out \
`$LLVM/Debug+Asserts/bin/llvm-config --cxxflags` \
-I$LLVM/tools/clang/include/ \
-lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization \
-lclangCodeGen -lclangParse -lclangSema -lclangChecker -lclangAnalysis \
-lclangIndex -lclangRewrite -lclangAST -lclangLex -lclangBasic \
`$LLVM/Debug+Asserts/bin/llvm-config --ldflags --libs`
- -이 명령을 실행하려고하면
/home/rob/llvm/include/llvm/Support/DataTypes.h:45:3: error: #error "Must #define __STDC_LIMIT_MACROS before #including System/DataTypes.h"
/home/rob/llvm/include/llvm/Support/DataTypes.h:49:3: error: #error "Must #define __STDC_CONSTANT_MACROS before " "#including System/DataTypes.h"
In file included from /llvm/tools/clang/include/clang/AST/Decl.h:17:0,
from /llvm/tools/clang/include/clang/AST/ASTContext.h:23,
from tut.cpp:3:
/llvm/tools/clang/include/clang/AST/APValue.h:18:29: fatal error: llvm/ADT/APSInt.h: No such file or directory
compilation terminated.
나는 __STDC_LIMIT_MACROS에 대한 첫 번째 오류가 나는 명령 줄에서 뭔가를 정의하지 않은 가정 ,하지만 다른 오류는 파일 include와 관련이 있습니다. 그것은 코드가 존재하지 않는 'llvm/APT/APSInt.h'를 조사하려고 시도하는 것 같습니다. 수동으로 이러한 경로를 변경하여 작동시킬 수는 있지만 잘못된 결과가 발생한 것처럼 보입니다.
누구든지 올바른 방향으로 나를 가리킬 수 있다면 크게 감사하겠습니다!