[英]Why am I seeing the following linker errors when building an iPhone app with Core Plot?
[英]Why am I getting CGContext errors when installing an iPhone app?
為什么在嘗試安裝iPhone應用程序時出現以下錯誤?
warning: Unable to read symbols for /Library/MobileSubstrate/MobileSubstrate.dylib (file not found).
warning: Unable to read symbols for /Library/Frameworks/CydiaSubstrate.framework/Libraries/SubstrateLoader.dylib (file not found).
2011-02-18 21:57:05.038 Catalog Dev[399:307] MS:Notice: Installing: com.yourcompany.Catalog-Dev [Catalog Dev] (550.32)
2011-02-18 21:57:05.210 Catalog Dev[399:307] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Activator.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/Activator.dylib (file not found).
2011-02-18 21:57:05.518 Catalog Dev[399:307] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/sandcastleclient.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/sandcastleclient.dylib (file not found).
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0.2/Symbols/usr/lib/libsubstrate.dylib (file not found).
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextDrawImage: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextSetStrokeColorWithColor: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextSetLineWidth: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextMoveToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextAddLineToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextAddLineToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextAddLineToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextAddLineToPoint: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGContextDrawPath: invalid context 0x0
Fri Feb 18 21:57:11 Moes-iPhone Catalog Dev[399] <Error>: CGBitmapContextCreateImage: invalid context 0x0
如果創建的應用程序使用第三方框架(例如,CydiaSubstrate.framework),則必須將該框架復制到應用程序包內的Frameworks
文件夾中。
在這里可以找到有關在Xcode中自動執行此過程的出色教程。
更新:
<Error>: CGContextDrawImage: invalid context 0x0
此錯誤表明您已調用CGContextDrawImage
,但未指定有效的CGContextRef
參數。 在沒有看到相關代碼的情況下,我不得不猜測正在發生什么。 CGContextDrawImage
的原型如下:
void CGContextDrawImage (
CGContextRef c,
CGRect rect,
CGImageRef image
);
第一個參數必須是有效的圖形上下文 ,通常是當前的圖形上下文,可通過以下方式訪問:
CGContextRef myContext = [[NSGraphicsContext currentContext] graphicsPort];
...
CGContextDrawImage(myContext, someRect, someImage);
似乎您要安裝的應用程序的部署目標比iPhone os版本大。 Xcode抱怨說他弄亂了您的代碼試圖使用的文字符號。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.