coolbear911 / panoramagl

Automatically exported from code.google.com/p/panoramagl
0 stars 0 forks source link

ARC project #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I got the following error when I compile my project which is using PanoramaGL 
library:

/PanoramaGL/PLPanoramaBase.h:29:13: Pointer to non-const type 'PLTexture *' 
with no explicit ownership

I know it's an ARC related problem. But I've added -fno-objc-arc to all the .m 
files for PanoramaGL. The problem is this error not belonging to a .m, instead 
of it's in a .h so that I can't add the flag -fno-objc-arc.

What should I do? Thanks

Original issue reported on code.google.com by bagusfl...@gmail.com on 3 Sep 2012 at 11:52

GoogleCodeExporter commented 8 years ago
I solved the problem by moving the problematic definition to .m file because 
they are private.

Original comment by bagusfl...@gmail.com on 3 Sep 2012 at 12:34

GoogleCodeExporter commented 8 years ago
is there a tutorial how to solved that problem? thanks man

Original comment by rotski...@gmail.com on 25 Sep 2012 at 3:12

GoogleCodeExporter commented 8 years ago
Hello,

I can't remember which file I changed (the .h file which give you the error 
message.) Because it's private variables, you can safely move it to .m file. 
And then add a flag -fno-objc-arc to .m file, so the compiler will not give you 
any error message any more.

ZH

�� 2012-9-25������11:12�� panoramagl@googlecode.com ���

Original comment by bagusfl...@gmail.com on 26 Sep 2012 at 12:17

GoogleCodeExporter commented 8 years ago
thanks for reply ill do wat  you said.  the .h file give me the error message.. 

Original comment by rotski...@gmail.com on 26 Sep 2012 at 1:12

GoogleCodeExporter commented 8 years ago
how to add the private variables to .m file? can u paste the example code? 
where can i paste the code? thanks man

Original comment by rotski...@gmail.com on 26 Sep 2012 at 1:35

GoogleCodeExporter commented 8 years ago
i figured it now,, but my next problem is in PLCamera.m 

error msge "ARC FORBID explicit message send of autorelease"

"autorelease is unavailable:not available in automatic reference counting mode

Original comment by rotski...@gmail.com on 26 Sep 2012 at 1:39

GoogleCodeExporter commented 8 years ago
You have to add flag -fno-objc-arc to your files which cause the problem.

�� 2012-9-26������09:12�� panoramagl@googlecode.com ���

Original comment by bagusfl...@gmail.com on 26 Sep 2012 at 3:09

GoogleCodeExporter commented 8 years ago
i figured it out thanks man,, i also  change the automatic  reference counting 
into "No" and  its success

Original comment by rotski...@gmail.com on 28 Sep 2012 at 9:38

GoogleCodeExporter commented 8 years ago
How did you solve the ARC - Pointer to non-const type "PLTexture". I tried 
moving the 
@private
PLTexture **previewTextures;
PLTexture **textures;
}

To the .m file. Please help. Thank you.

Original comment by AnthonyS...@gmail.com on 11 Nov 2012 at 2:52

GoogleCodeExporter commented 8 years ago
Just like I said move this to lines to .m file and add -fno-objc-arc in your 
project setting.

�� 2012��11��11�գ�����10:52��panoramagl@googlecode.com д����

Original comment by bagusfl...@gmail.com on 12 Nov 2012 at 12:25

GoogleCodeExporter commented 8 years ago
Did you move it to the PL.PanoramaBase.m  ?

Or did you put in the view.m.

Thanks.

Original comment by AnthonyS...@gmail.com on 12 Nov 2012 at 2:21

GoogleCodeExporter commented 8 years ago
Yes. I add something like:

@interface PLPanoramaBase()
{
    PLTexture **previewTextures;
    PLTexture **textures;
}

@end

in PanoramaBase.m.

�� 2012��11��12�գ�����10:21��panoramagl@googlecode.com д����

Original comment by bagusfl...@gmail.com on 12 Nov 2012 at 2:32

GoogleCodeExporter commented 8 years ago
Superb. I did the syntax wrong. Thank you a TON!!!!

Original comment by AnthonyS...@gmail.com on 12 Nov 2012 at 3:12

GoogleCodeExporter commented 8 years ago
Error : /PanoramaGL/PLPanoramaBase.h:29:13: Pointer to non-const type 
'PLTexture *' with no explicit ownership

Solution :

1. PLPanoramaBase.h

@interface PLPanoramaBase : PLScene <PLIPanorama>
{
#pragma mark -
#pragma mark member variables
@private // Remove this line
    PLTexture **previewTextures; // Remove this line
    PLTexture **textures; // Remove this line
}

@end

   Remove the PLTexture **previewTextures; and PLTexure **textures; lines from PLPanoramaBase.h file.

2. PLPanoramaBase.m

Add the following code in .m file above @implementation PLPanoramaBase line

@interface PLPanoramaBase()
{
    PLTexture **previewTextures;
    PLTexture **textures;
}

@end

3. Add -fno-objc-arc for PLPanoramaBase.m file in your project setting.

Thanks
RAMESH ANNADURAI

Original comment by aramesh....@gmail.com on 6 Dec 2012 at 10:11