如何设置CGBITMAP_CONTEXT_LOG_ERRORS环境变量? [英] How to set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable?
问题描述
使用 CGBitmapContextCreate
时,我在XCode中遇到错误
While using CGBitmapContextCreate
I get error in XCode
CGBitmapContextCreate:不支持的参数组合:设置
CGBITMAP_CONTEXT_LOG_ERRORS环境变量以查看详细信息
CGBitmapContextCreate: unsupported parameter combination: set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable to see the details
如何设置此变量?
我尝试了
launchctl setenv CGBITMAP_CONTEXT_LOG_ERRORS /Users/user/Documents/cgbitmap_errors.log
和 launchctl setenv CGBITMAP_CONTEXT_LOG_ERRORS 1
并重新启动XCode均未成功。
I tried
launchctl setenv CGBITMAP_CONTEXT_LOG_ERRORS /Users/user/Documents/cgbitmap_errors.log
and launchctl setenv CGBITMAP_CONTEXT_LOG_ERRORS 1
and restarting XCode with no success.
我还尝试了与 defaults组合使用com.apple.dt.Xcode UseSanitizedBuildSystemEnvironment -bool NO
,也没有成功
I also tried combination with defaults write com.apple.dt.Xcode UseSanitizedBuildSystemEnvironment -bool NO
, no success too
我也重新启动了计算机
推荐答案
可以在以下位置设置环境变量产品方案编辑器(以Xcode表示),如屏幕截图所示:
Environmental variables can be set in the product scheme editor (in Xcode) like shown in the screenshot:
Product> Scheme> Edit Scheme ...(⌘<)
Product > Scheme > Edit Scheme... (⌘<)
这篇关于如何设置CGBITMAP_CONTEXT_LOG_ERRORS环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!