2011-12-06 11 views
7

के साथ कठिनाई मैं सोच रहा था कि कोई मुझे यह समझने में मदद कर सकता है या नहीं। जब मैं अजगर setup.py निर्माण करने की कोशिश (या स्थापित पिप, या easy_install), ऐसा होता हैमैक ओएस एक्स पर पाइथन पैकेज ऑटॉपी स्थापित करने में मदद की ज़रूरत है - libpng और png.h

सार

src/png_io.c:3:17: error: png.h: No such file or directory 
src/png_io.c: In function ‘newMMBitmapFromPNG’: 
src/png_io.c:34: error: ‘png_struct’ undeclared (first use in this function) 
src/png_io.c:34: error: (Each undeclared identifier is reported only once 

... त्रुटियों की गुच्छा ...

src/png_io.c:332: error: ‘PNG_TRANSFORM_IDENTITY’ undeclared (first use in this function) 
lipo: can't figure out the architecture type of: /var/folders/kt/d8t29zkx7kd_7c_mr17ntv6m0000gn/T//ccubs4CM.out 

error: command 'gcc-4.2' failed with exit status 1 

है libpng लाइब्रेरी/फ्रेमवर्क में है, जो < के लिए खोज पथ पर है> इसमें शामिल है (मैंने cpp -v के साथ चेक किया है), लेकिन इसमें libpng.framework के रूप में है, और फिर हेडर हेडर्स नामक एक उपनिर्देशिका में हैं। Libpng.framework फ़ाइल में libpng के कई संस्करण भी हैं। मैं 64 बिट पायथन भी चला रहा हूं। कोई विचार कैसे आगे बढ़ना है?

धन्यवाद, पैट

उत्तर

2

त्रुटि है, जैसा कि आप समझ, क्योंकि संकलक हेडर फाइल png.h

क्या आप मुझे बता सकते हैं कि कैसे ढांचे शामिल किया जा रहा है नहीं मिल सकता है? क्या आप -आई और -एल का उपयोग कर रहे हैं?

जीसीसी के साथ एक रूपरेखा सहित के लिए सही सिंटैक्स

जीसीसी एफ है * dir *

या

जीसीसी -iframework * dir *

आशा इस मदद करता है

http://gcc.gnu.org/onlinedocs/gcc/Darwin-Options.html

-F से dir शीर्षलेख फ़ाइलों के लिए खोज की जाने वाली निर्देशिकाओं की सूची के शीर्ष पर ढांचे निर्देशिका dir जोड़ें। ये निर्देशिकाएं II द्वारा निर्दिष्ट विकल्पों के साथ interleaved हैं और बाएं से दाएं क्रम में स्कैन किए गए हैं।

A framework directory is a directory with frameworks in it. A framework is a directory with a Headers and/or PrivateHeaders directory contained directly in it that ends in .framework. The name of a framework is the name of this directory excluding the .framework. Headers associated with the framework are found in one of those two directories, with Headers being searched first. A subframework is a framework directory that is in a framework's Frameworks directory. Includes of subframework headers can only appear in a header of a framework that contains the subframework, or in a sibling subframework header. Two subframeworks are siblings if they occur in the same framework. A subframework should not have the same name as a framework, a warning will be issued if this is violated. Currently a subframework cannot have subframeworks, in the future, the mechanism may be extended to support this. The standard frameworks can be found in /System/Library/Frameworks and /Library/Frameworks. An example include looks like #include <Framework/header.h>, where Framework denotes the name of the framework and header.h is found in the PrivateHeaders or Headers directory. 
0

इस विशेष मामले में, ऐसा इसलिए है क्योंकि आप libpng खो रहे हैं। (पीएनजीएच के साथ ढांचा)

आप इसे http://ethan.tira-thompson.com/Mac_OS_X_Ports.html से इंस्टॉल कर सकते हैं फिर ऑटोपी इंस्टॉल को फिर से चलाएं और आपको जाने के लिए अच्छा होना चाहिए!

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