In my iOS 8 testing, everything seems to be working fine but now I'm getting issues with my OpenGLES framework where the gl header file exists, but for some reason it says that the GL_TEXTURE0 definition (along with various other definitions) cannot be found.
glActiveTexture(GL_TEXTURE0);
Exact error:
Implicit declaration of function glActiveTexture is invalid in C99.
Use of undeclared identifier 'GL_TEXTURE0'
This could be because I may be importing the framework incorrectly, but this is how I've been using it and it works fine in iOS 7 and below.
#import <OpenGLES/EAGL.h>
I'm not sure what the reasoning is, but I changed my import statements as follows:
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
This seems to resolve the issue.
Related
I am attempting to use the autogenerated Swift bridging header in an Objective-C class, but when I try to include it, I get many errors in the bridging header. Since the header is automatically generated, its not at all clear what I might have wrong.
In an Objective-C class, if I declare the following line I will get build errors - without this line, no errors and it builds fine:
#import "Oilist-Swift.h"
EDIT: I just moved the #import "Oilist-Swift.h" statement to after all the other headers have been imported, and now I only get errors relating to MFMailComposeViewControllerDelegate and possibly one error relating to PopupStoreControllerDelegate. Here are all the errors now:
Angle brackets contain both a protocol ('PopupStoreControllerDelegate') and a type ('MFMailComposeViewControllerDelegate')
Unknown class name 'MFMailComposeViewControllerDelegate'; did you mean 'MFMailComposeViewController'?
Replace 'MFMailComposeViewControllerDelegate' with 'MFMailComposeViewController'
- (void)mailComposeController:(MFMailComposeViewController * _Nonnull)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError * _Nullable)error;
Expected a type (MFMailComposeResult)
I've looked for circular references and can't find any so far.
Any insights would be greatly appreciated!
Seems really close now - it seems its just not happy with MFMail for some unknown reason.
If I import MessageUI.h it works now. (Despite MessageUI not being used at all in the class importing the Swift header).
I guess I have to import MessageUI because it is referenced in the bridging header and doesn't include a definition for the MessageUI stuff...
Solution:
#import <MessageUI/MessageUI.h>
#import "Oilist-Swift.h"
I am trying to follow the steps given here:
http://docs.pushmote.com/docs/import-pushmote-ios-sdk-swift
but I am getting this error: 'PushmoteSDK/Headers/Pushmote.h' file not found, when I try and build my app.
Its my Pushmote-Bridging-Header.h file that has this import statement and the file is clearly there, in project_dir/PushmoteSDK.framework/Headers/Pushmote.h
I have read about a few other header file not found error with xcode and the solutions seem to vary a lot, so I think it might have to do with the specific version of xcode. Perhaps someone has used pushmote with xcode7 before and can assist?
EDIT:
This is my Pushmote-Bridging-Header.h file found in /Users/alex/ios_projects/Monkey/Monkey/Pushmote-Bridging-Header.h
#ifndef Pushmote_Bridging_Header_h
#define Pushmote_Bridging_Header_h
#import "PushmoteSDK/Pushmote.h"
#endif /* Pushmote_Bridging_Header_h */
You should change import line like this;
#import "PushmoteSDK/Headers/Pushmote.h"
to
#import "PushmoteSDK/Pushmote.h"
I'm getting this error:
/Class/GData/OAuth/GDataOAuthViewControllerTouch.m:116:22: Expected a type
That line is:
authentication:(GDataOAuthAuthentication *)auth
Inside of this block of code:
- (id)initWithScope:(NSString *)scope
language:(NSString *)language
requestTokenURL:(NSURL *)requestURL
authorizeTokenURL:(NSURL *)authorizeURL
accessTokenURL:(NSURL *)accessURL
authentication:(GDataOAuthAuthentication *)auth
appServiceName:(NSString *)keychainAppServiceName
delegate:(id)delegate
finishedSelector:(SEL)finishedSelector {
NSString *nibName = [[self class] authNibName];
I'm a newb XCode developer. So far I've created and compiled a calculator app based from an online class but that's it.
Is this a library that is not being included?
Background: The previous developer abandoned the project and the owner sent the project code to me. I'm trying to replace the existing graphics with new graphics and recompile it with support for iOS 6, which I thought I should be able to do without any coding, but have run into this error and many others when I opened the project. I have the latest XCode.
The :22 (and the position of the caret within the editor) tell you exactly where on the line the error is. In this case it's telling you that where it sees GDataOAuthAuthentication it was expecting a type. So, implicitly, it doesn't recognise that GDataOAuthAuthentication is a type.
Objective-C still sits upon compilation units ala C — each .m file is compiled in isolation then the lot are linked together. You use #import (or #include if you want; #import just guarantees the same file won't be included twice) to give each individual file visible sight of any external definitions it needs.
So, that's a long-winded way of reaching the same conclusion as Rick did five minutes ago: you've probably omitted a necessary #import.
A few things to look for:
Did you #import the file where the GDataOAuthAuthentication type is defined? (e.g. #import "GDataOAuthAuthentication.h")
Is there a variable named GDataOAuthAuthentication which is causing the compiler to think GDataOAuthAuthentication is a variable not a type?
I have a Problem when I try to compiling my iOS project with iOS 8.
The errors messages are:
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
Recently I have faced the same issue.
The easiest way to resolve this problem is by adding #import OpenGLES; line in each file where you have got this message.
For iOS 8 is necessary Import
#import <OpenGLES/ES3/glext.h>
This link is the solution Click Here...
I need to download and unzip a file in my Xcode project,
I am using Ziparchive (https://code.google.com/p/ziparchive/downloads/detail?name=ZipArchive.zip) to do so,instead of following every step I am getting compilation error as below:
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:68:18: Redefinition of 'fopen_file_func' as different kind of symbol
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:68:35: Use of undeclared identifier 'opaque'
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:68:58: Expected ';' after top level declarator
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:72:1: Expected unqualified-id
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:90:17: Redefinition of 'fread_file_func' as different kind of symbol
Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:90:42: Use of undeclared identifier 'stream'; did you mean 'strcat'?
Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:90:50: Use of undeclared identifier 'buf'
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:95:1: Expected unqualified-id
I dont have a clue how to compile it successfully, any help is appreciated.
In my case, it happens because I have an incorrect Prefix file.
It was including objective c imports outside the "#ifdef OBJC" block
So that there was no problem when all classes were objetctive-C classes but it didn't compile when I add the C classes of minizip.
Just moving all the imports in the prefix file inside the obj block and voilà!
#ifdef __OBJC__
#import <Availability.h>
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
I hope this helps
Please Add the FrameWork libz.dylib in your project and solve your problem
Project setting -> Target-> Build Phases -> Linked Frameworks and Libraries -> select ibz.dylib
I got the solution,I am using Metaio SDK for Augmented Reality which has a compile dependancy, it can only be compiled as "Compile sources as - > Objective C++" and this was the reason creating the problem, Ziparchive compiled fine otherwise, now to merge both in the same project I made Ziparchive as a STATIC LIBRARY and linked it in Xcode, it solved the problem.