Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / Building Tier 2 app: expected unqualified-id before string constant

Author
Message
Alpha Mike
13
Years of Service
User Offline
Joined: 22nd Aug 2010
Location: Bristol, UK
Posted: 11th Aug 2012 16:32
Hello folks,
I've been building my game on Windows and I want to move it over to Android. I've got the Simple "Hello World" template working and building, so I've used that as the basis for my game build. Unfortunately I get this issue when building with the NDK:



It doesn't even seem to be getting to my code. I'm sure this problem is a PEBKAC issue

Has anyone had this issue/seen it before?

Cheers,

AM
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Aug 2012 18:44
One of the things that can cause that is not having the right permissions/ownership of files/directories.

Try this using the cygwin window:


The first command makes sure that all permissions are allowed on all files/directories created by processes in the cygwin session. It only applies to the current session, so should be executed as the first command whenever you open a cygwin window.

The second command changes your current directory to the top of your Android setup.

The third command makes sure that the ownership of all the files and directories is the same and that it is you, the Windows user. Make sure to substitute your Windows user name for <winusername>.

The fourth command makes sure that all the files and directories are readable and writable by everyone.

The combination just might get rid of the command.

I assume that you are doing Tier 2 since you talk about the template. Did you download the template from the TGC 'Your Products' download page? If not, try doing so and building it to make sure your setup works.

Are you working with v1076? And was your Android setup created with that version?

Cheers,
Ancient Lady
AGK Community Tester
Alpha Mike
13
Years of Service
User Offline
Joined: 22nd Aug 2010
Location: Bristol, UK
Posted: 11th Aug 2012 20:05
Thanks for the reply,

I gave that a shot and still the same issues.

Yeah it's Tier 2 (C++) v1076. I've used the template from the 'Your Products' page I've just downloaded again to make 100% sure.

The template compiles fine fresh out of zip file, but as soon as I put my code into it, it breaks.

I've been doing some digging all afternoon and it seems that I've probably fallen foul of the overlooking the VC++ compiler does. I tried commenting out the offending header includes in the AGK.h file (wrong I know,but it was worth exploring) and I get a heck of a lot of errors to do with my code things like undefined vlists and other probably bad things that the VC++ compiler lets you get away with. It seems that this 'expected unqualified-id' can mask those problems

Schoolboy error I probably should have deployed it to Android instead of getting comfortable 'simply just' testing it on Windows and thinking it'll be fine.

Live and learn eh!

Thanks again Ancient Lady

AM

p.s. I'll build another test app and see if this problem appears in that.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Aug 2012 22:03
The trick with doing Windows Tier 2 and then making it work in other platforms is to make sure to avoid using any Microsoft or Windows specific headers/classes/code.

Includes like <string>, <varargs>, <time.h>, <math.h> and <list> are totally cool and work.

Or using any external libraries that don't have versions for the target platforms.

I ran into some problems with my Tier 2 app on Android. It has been hard to identify the offending code. It appears to be related to setting the display setup and something in AppGameKit tries to delete something that isn't defined (based on the debug stuff I see on the Android device). I'll figure it out.

Good luck with your development.

Cheers,
Ancient Lady
AGK Community Tester

Login to post a reply

Server time is: 2024-03-29 00:10:27
Your offset time is: 2024-03-29 00:10:27