2012-02-22 3 views
11

tutorial으로 ios 툴체인을 만드는 중입니다. make 명령을 실행하면 ENABLE_OPTIMIZED = 1이 출력됩니다.'strcmp'가이 범위에서 선언되지 않았습니다.

llvm[0]: Reconfiguring with /home/connor/llvm-svn/configure 
config.status: creating Makefile.config 
config.status: creating llvm.spec 
config.status: creating docs/doxygen.cfg 
config.status: creating tools/llvm-config/llvm-config.in 
config.status: creating include/llvm/Config/config.h 
config.status: creating include/llvm/Support/DataTypes.h 
config.status: include/llvm/Support/DataTypes.h is unchanged 
config.status: creating include/llvm/ADT/hash_map 
config.status: include/llvm/ADT/hash_map is unchanged 
config.status: creating include/llvm/ADT/hash_set 
config.status: include/llvm/ADT/hash_set is unchanged 
config.status: creating include/llvm/ADT/iterator 
config.status: include/llvm/ADT/iterator is unchanged 
config.status: executing setup commands 
config.status: executing Makefile commands 
config.status: executing Makefile.common commands 
config.status: executing examples/Makefile commands 
config.status: executing lib/Makefile commands 
config.status: executing runtime/Makefile commands 
config.status: executing test/Makefile commands 
config.status: executing test/Makefile.tests commands 
config.status: executing tools/Makefile commands 
config.status: executing utils/Makefile commands 
config.status: executing projects/Makefile commands 
config.status: executing bindings/Makefile commands 
config.status: executing bindings/ocaml/Makefile.ocaml commands 
make[1]: Entering directory `/home/connor/llvm-svn/lib/System' 
llvm[1]: Compiling Alarm.cpp for Release build 
llvm[1]: Compiling Disassembler.cpp for Release build 
Disassembler.cpp: In function ‘std::string llvm::sys::disassembleBuffer(uint8_t*, size_t, uint64_t)’: 
Disassembler.cpp:44:12: warning: variable ‘bits’ set but not used [-Wunused-but-set-variable] 
llvm[1]: Compiling DynamicLibrary.cpp for Release build 
DynamicLibrary.cpp: In static member function ‘static void* llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(const char*)’: 
DynamicLibrary.cpp:178:5: error: ‘strcmp’ was not declared in this scope 
DynamicLibrary.cpp:178:5: error: ‘stderr’ was not declared in this scope 
DynamicLibrary.cpp:179:5: error: ‘strcmp’ was not declared in this scope 
DynamicLibrary.cpp:179:5: error: ‘stdout’ was not declared in this scope 
DynamicLibrary.cpp:180:5: error: ‘strcmp’ was not declared in this scope 
DynamicLibrary.cpp:180:5: error: ‘stdin’ was not declared in this scope 
make[1]: *** [/home/connor/llvm-svn/lib/System/Release/DynamicLibrary.o] Error 1 
make[1]: Leaving directory `/home/connor/llvm-svn/lib/System' 
make: *** [all] Error 1 

나는 무엇을 만들고 내 인터넷 검색이 도움이되지 못했습니다.

+1

'string.h'에'strcmp'가 선언되었습니다.'#include '을'DynamicLibrary.cpp'에 넣으십시오. stderr는'stdio.h'에 지정되어 있으므로 넣으십시오. – jcubic

+0

@jcubic 답변으로 의견을 게시하십시오. – 0xDE4E15B

+0

이 것을 이해하지 못합니다. 어쩌면'./configure'를 다시 시도해보십시오. – jcubic

답변

18

을 strcmp 기능은 DynamicLibrary.cpp에서

#include <string.h> 

를 넣어하려고 string.h에 선언 및 stderr은 너무 너무

#include <stdio.h> 

시간에서 시간 I에 넣어 STDIO.H에 defained한다 헤더 파일이 누락 된 오픈 소스 코드를 발견했습니다.

+0

덕분에 거의 모든 것이 수정되었습니다. 이제 컴파일 할 때 다음 오류가 생깁니다 : llvm [0] :/home/connor/llvm-svn/configure를 사용하여 재구성 make : *** [/home/connor/llvm-svn/config.status] 오류 1 – connor

+0

다른 질문을 만들 수 있습니다. – jcubic

관련 문제