iPhone - ShareKit , SHK.m giving the compiler error for FileNot Found
Asked Answered
B

5

14

I am facing the issue while compiling my iphone project with ShareKit Integrated .I was working on that , everything was working fine till now , all of a sudden now its giving me the error. In SHK.m file ,

  #import </usr/include/objc/objc-class.h>  file not found

I guess I have accidentally changed something or deleted any file . Not getting what has happened wrong. Can anybody help me with this issue ??

Note : ( I have not changed my Xcode , nor the project location or anything )

Brinkema answered 29/11, 2011 at 12:14 Comment(0)
B
32

The problem is with the line

    #import </usr/include/objc/objc-class.h> 

It has to be

        #import <objc/message.h> 
        #import <objc/runtime.h>
Brinkema answered 30/11, 2011 at 4:8 Comment(0)
T
12

Are you using xcode 4.3? if yes then just replace

#import </usr/include/objc/objc-class.h>

this with #import <objc/runtime.h>

Truax answered 20/5, 2012 at 17:13 Comment(0)
D
1

Yes new #import does solve the problem but give new error

file - New OAuth Web Service.m
file -  /shareKit/Template Src/ShareKit/New Web Service.m
file - /shareKit/Template Src/ShareKit/New Action.m

code - `«OPTIONALHEADERIMPORTLINE»`
error - Expected identifier or '('
Descend answered 3/5, 2012 at 5:1 Comment(0)
U
1

Yes new #import does solve the problem but give new error

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Urticaria answered 20/11, 2012 at 6:30 Comment(0)
A
0

Import

#import < Objc/message.h >

#import < objc/runtime.h >

Imstead OF

import < /usr/include/objc/objc-class.h>

And Change the Deployment Target to 7.0 and It has worked for Me.

Aklog answered 11/1, 2016 at 12:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.