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.

AppGameKit Classic Chat / How have succeeded in compiling the AGK player without warnings?

Author
Message
Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
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.

iOS Apps from Trisect Development.
Click here.
Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
Posted: 30th Sep 2011 21:47
I did mean.
Who have succeeded in compiling the AppGameKit player without warnings?

iOS Apps from Trisect Development.
Click here.
Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
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.

iOS Apps from Trisect Development.
Click here.
Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
Posted: 2nd Oct 2011 16:55
Maybe TGC can make a new AppGameKit Player that wil compile without warning in Xcode 4??

iOS Apps from Trisect Development.
Click here.
MikeHart
AGK Bronze Backer
21
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
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.
Spacebuddy
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
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
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 2nd Oct 2011 20:10
Quote: "warning: deprecated conversion from string constant to 'char*' change to a 0
"


what do you exactly change to zero?
Spacebuddy
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
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.
Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
Posted: 2nd Oct 2011 22:03
#Spacebuddy and #bjadams

THANKS A LOT!!

No warnings now.

iOS Apps from Trisect Development.
Click here.
ElterJohn
13
Years of Service
User Offline
Joined: 2nd Oct 2011
Location:
Posted: 3rd Oct 2011 05:29
Pretty Nice. COngrats!

Spacebuddy
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
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.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 9th Oct 2011 04: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)

I drink tea, and in my spare time I write software.
Zubby1970
AGK Backer
16
Years of Service
User Offline
Joined: 22nd May 2008
Playing: AGK Studio Always
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.

There can only be one
MikeHart
AGK Bronze Backer
21
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 1st Dec 2011 14:10
Quote: "...and I really do like warning free compiles (unlike Mike)"


Same here.
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 1st Dec 2011 19:53 Edited at: 1st Dec 2011 19:54
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.

Go through yourself at a wall.
Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
Posted: 5th Dec 2011 18:43
Updated Xcode and updated AppGameKit, now I get this warning in my game.


Comparison of unsigned expression < 0 is always false.

If I put in <= 0 then theres no warning, but my game does not run properly.

iOS Apps from Trisect Development.
Click here.
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 5th Dec 2011 23:22
DWORD is cardinal (unsigned) and cannot be less than zero. Try using an integer instead.

-- Jim
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 5th Dec 2011 23:24
Quote: "Comparison of unsigned expression < 0 is always false.

If 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.


Trisect Development
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
Posted: 6th Dec 2011 12:13 Edited at: 6th Dec 2011 13:03
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.

iOS Apps from Trisect Development.
Click here.

Login to post a reply

Server time is: 2024-11-22 19:16:53
Your offset time is: 2024-11-22 19:16:53