2014-09-24 44 views
5

我有一個問題,當我嘗試編譯我的iOS項目與iOS 8的功能「glReadPixels」隱聲明是無效的C99編譯在iOS 8

的錯誤信息是:

Implicit declaration of function 'glReadPixels' is invalid in C99 compiling 
Conflicting types for 'glReadPixels' 
Declaration of 'glReadPixels' must be imported from module 'OpenGLES.ES3.gl' before it is required 
+0

聽起來像一個包括訂購問題。你是否在任何地方引用glReadPixels? – 2014-09-24 12:42:03

+0

[Xcode 6 for iOS8中顯示OES OpenGL語句的錯誤]的可能重複(http://stackoverflow.com/questions/24024764/errors-showing-for-oes-opengl-statements-in-xcode-6-for- iOS8上) – Droppy 2014-09-24 13:18:12

回答

8

最近我遇到了同樣的問題。

解決此問題的最簡單方法是在收到此消息的每個文件中添加@import OpenGLES;行。

1

對於iOS 8是必要導入

#import <OpenGLES/ES3/glext.h> 

此鏈接是溶液Click Here...

相關問題