Posted: 30th Sep 2011 21:27
My AGG player runs on my iPad and iPhone but I do get some compile warning when compiling it.

Anyone here had the same warnings. I'm running Xcode 4.1 with SDK 4.2.1

This is my warnings:
backslash-newline at end of file
warning: deprecated conversion from string constant to 'char*'
NULL used in arithmetic

Maybe if I could solve this warnings my game will run smoother.
Posted: 30th Sep 2011 21:47
I did mean.
Who have succeeded in compiling the AppGameKit player without warnings?
Posted: 2nd Oct 2011 12:41
So nobody did try this!!
Or get it just work for you.

I could really use some help on this.
Posted: 2nd Oct 2011 16:55
Maybe TGC can make a new AppGameKit Player that wil compile without warning in Xcode 4??
Posted: 2nd Oct 2011 19:25
What's the problem? Not working? I often get warning with C++ projects. Be it windows, be it OSX. I find that normal in C++. Thta's why I don't liek the language. You fight more with the compiler than with your own code.
Posted: 2nd Oct 2011 20:03
I have no issues when I compile using Xcode 4.1.

You can fix these errors.

backslash-newline at end of file to fix this go to the end of the file and press enter, it needs the newline at the end

NULL used in arithmetic change to LPSTR pIncludeFile =(char *) "";



warning: deprecated conversion from string constant to 'char*' change to a 0

When you compile you should get no issues
Posted: 2nd Oct 2011 20:10
"


what do you exactly change to zero?
Posted: 2nd Oct 2011 20:19
Sorry, Change NULL used in arithmetic to 0

I fixed these warnings when agk was first released so I am working on memory.
Posted: 2nd Oct 2011 22:03
#Spacebuddy and #bjadams

THANKS A LOT!!

No warnings now.
Posted: 3rd Oct 2011 5:29
Pretty Nice. COngrats!
Posted: 3rd Oct 2011 21:51
Awesome, I have to congratulate the team who created AppGameKit, it is one of the best programming languages I have used to date.
Posted: 9th Oct 2011 4:44
We're still learning (even after 12 years). Thanks for finding fixes to those warnings, can you post the solutions in the issues board here: http://code.google.com/p/agk/issues/list. My fear is that this important tweak gets lost in the flow of threads, and I really do like warning free compiles (unlike Mike)
Posted: 29th Nov 2011 23:38
awsome just compiled the player in xcode after all the provisions and learning curves i used mac osx lion and xcode 4.1

oh yeah now i can carry on developing my app cool. thanks for the video lee. a bit wobbly in parts but managed it.
Posted: 1st Dec 2011 14:10
...and I really do like warning free compiles (unlike Mike)


Same here.
Posted: 1st Dec 2011 19:53
The problem with xcode is that it does not show every warning like c++ does. Its a good thing that the code is similar in both c++ and xcode for compiling.
Posted: 5th Dec 2011 18:43
Updated Xcode and updated AppGameKit, now I get this warning in my game.

+ Code Snippet
if ( dwLatestArrayOffset < 0 || dwLatestArrayOffset >= pdwHeaderDimSize[9] )

Comparison of unsigned expression < 0 is always false.

If I put in <= 0 then theres no warning, but my game does not run properly.
Posted: 5th Dec 2011 23:22
DWORD is cardinal (unsigned) and cannot be less than zero. Try using an integer instead.
Posted: 5th Dec 2011 23:24
f I put in <= 0 then theres no warning, but my game does not run properly.


An unsigned variable is always 0 or greater. If you use an equals sign, it'll return true on 0. Currently it returns false on 0. This is probably the difference. Either just get rid of that first part of the statement (dwLatestArrayOffset < 0), make it a signed variable if it's supposed to be, or otherwise adjust your if statement to do what you intend it to.
Posted: 6th Dec 2011 12:13
The code was made by TGC I only provided my ByteCode so I guess others could have the same problem.

I changed it to Int and that removed the warning.