0

I know in order to avoid these type of compiling errors a way to solve this is to use @class MyClass in the header instead of import. Then #import the header in the implementation but this is not working for me.

The compile errors does not appear in the header file where I am importing the class but in the imported class' header.

The error I get is

class PVRShell --> Redefinition of 'PVRShell' as different kind of symbol.

Just in case I am using PowerVR and GLView(OpenGl) in my project.

Any ideas of how can I solve this compile error?

Edu
  • 25
  • 9

1 Answers1

0

Rename your file extension from .m to .mm. You have to do that if your class use Objective-C++.

Greg
  • 25,317
  • 6
  • 53
  • 62
  • my C++ extension is .cpp not .mm. I tried to rename it to .mm also and did not work. If I do not loop the import it builds and runs as .mm also. – Edu Apr 01 '14 at 00:51
  • I fixed this by importing the classes from the implementation file. not the header. I don't know what is the reason behind this. – Edu Apr 01 '14 at 05:41