2012-02-22 30 views
11

मैं इस tutorial के साथ आईओएस टूलचेन बनाने पर काम कर रहा हूं। जब मैं कमांड चलाता हूं 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

'strcmp'' string.h' में घोषित किया गया है ''डायनामिक लाइब्रेरी सीपीपी' में '#' डालने का प्रयास करें और stderr को' stdio.h' में रखा गया है, इसलिए उसे भी डालें। – jcubic

+0

@jcubic उत्तर के रूप में अपनी टिप्पणी पोस्ट करें। – 0xDE4E15B

+0

इसे समझ में नहीं आ रहा है। शायद फिर से '।/Config' चलाने की कोशिश करें। – jcubic

उत्तर

18

strcmp समारोह string.h में घोषित किया जाता है

#include <string.h> 
DynamicLibrary.cpp में

डाल करने के लिए कोशिश करते हैं और stderr stdio.h में defained है, ताकि भी

#include <stdio.h> 

समय-समय मैं करने के लिए रखा अनुपलब्ध हेडर फ़ाइलों के साथ ओपन सोर्स कोड भी मिला।

+0

इसके लिए धन्यवाद कि यह लगभग सब कुछ तय किया। अब जब मैं संकलित करता हूं तो मुझे यह त्रुटि है: llvm [0]:/home/connor/llvm-svn/कॉन्फ़िगर करने के साथ कॉन्फ़िगर करें: *** [/home/connor/llvm-svn/config.status] त्रुटि 1 – connor

+0

आप इसके लिए एक और सवाल बनाने का प्रयास कर सकते हैं। – jcubic

संबंधित मुद्दे