# OS X - XCode project file

This topic is 4370 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey, As most OS X coders (as far as I know) like to use XCode instead of makefiles (even though it works like a charm) I created a XCode project that builds AngelScript in to a framework (Universal Binary). I wouldn't mind maintaining it (which is just adding and removing files) so it stays up to date. If the mainainer is interested in having the xcode project along with the rest of the project files feel free to send me an email (or just Reply ;-), stygeo ^^at^^gmail^^DOT^^com). There was also an error in the code (latest repos). This might be just a compiler error but it was easy to fix. In file as_restore.cpp on line 623 and line 631 there's the error(GNU GCC 4.x) about some new ISO standard. As int n is declared on line 599 in the for loop, according to the new ISO furthur using of this variable is no longer possible. Placing the int n = 0; before the first loop on line 599 and by changing int n = 0; on line 599 in the for loop to n = 0; will fix this tiny little error. Hope that helps. Kind regards, Jeffrey

##### Share on other sites
Hi,
that would be great. Since I had some problems to complie AS 2.6 properly in XCode. So I'm still using AS 2.5. Maybe you could also add a build traget for a static library. So users who prefer the static library (like me) could use that build target.

Could I get your XCode project?
martin AT cheetah3d DOT de

Bye,
Martin

##### Share on other sites
That for-loop thing isn't a new standard; compilers have just implemented it wrong for a long time. I was so surprised that MSVC8.0 (which also now has standards conforming behavior) wouldn't catch this error that I went to look and see if it was silently grabbing something from an enclosing scope. To my relief, I discovered that the change you suggested had already been made - and probably a while ago; I've been using AngelScript with MSVCExpress since the first Express beta. The code in question -

else if( c == BC_TYPEID )		{			// Translate type ids into indices			asDWORD tmp[MAX_DATA_SIZE];			int n;			for( n = 0; n < asCByteCode::SizeOfType(bcTypes[c])-1; n++ )				tmp[n] = *bc++;			*(int*)tmp = FindTypeIdIdx(*(int*)tmp);			for( n = 0; n < asCByteCode::SizeOfType(bcTypes[c])-1; n++ )				WRITE_NUM(tmp[n]);		}

Incidentally, it could just say 'int n = 0' in both for loops. That's slightly better; as it is now I have to stop and think 'wait, is n used anywhere else? Is the value n has at the end of loop 1 important to loop 2?'

##### Share on other sites
There are some problems compiling 2.6 with XCode and the makefile actually. I checked out the latest repos and to my suprise it compiled fine without making any changes to the source (besides the one discribed above). I can sure mail you the XCode project file but I must warn that you'll probably run in to the same build errors with the latest release.

Just checkout the latest repos from sf and place the xcode project in the project directory. I'll make those changes you asked for (probably tomorrow) and mail them to you.

Cheers,
Jeffrey

##### Share on other sites
Again, I am forced to ask, what change?

##### Share on other sites
Quote:
 Original post by stygeoJust checkout the latest repos from sf and place the xcode project in the project directory. I'll make those changes you asked for (probably tomorrow) and mail them to you.

Hi,
that would be great.

Another probably quite dump question. I found the latest AS source code on SF

http://svn.sourceforge.net/viewcvs.cgi/angelscript/trunk/sdk/

but how can I download all files at once? I couldn't find a .zip archive.

Bye,
Martin

##### Share on other sites
i think you better search for TortoiseSvn and checkout repository directly. all howtos are written in sourceforge svn access

##### Share on other sites
Download 'port' (just google for it) it's somewhere on the darwin ports website. Once you aquired, compiled and installed port do the following(in a console); "sudo port install svn". It will automatically download the svn source and all dependencies. Once port is done downloading/compiling svn 'cd' to your favorite directory and type "svn co https://svn.sourceforge.net/svnroot/angelscript/trunk angelscript". It will now check out the latest repos and you can find the files in \$CURRENTDIR/angelscript when it's done.

Cheers,
Jeff

##### Share on other sites
Hi Jeff,
thanks for the extra lesson on how to use svn. Now I also have 2.6 up and running :)

When compiling AS 2.6 there was just one small error (int i=0 declaration in the first for loop) left in

which could be easily fixed.

Bye,
Martin

##### Share on other sites
This is great. The community needs more OS X users that can help keep AngelScript working on that system. :)

I've corrected the code bug in asCRestore::ReadObjectTypeDeclaration(). Most of the time I use MSVC6 when compiling AngelScript, and unfortunately it permits this kind of non-standard code. But this is work-in-progress code, and before releasing a new version I usually compile the code with a couple of different compilers, including MinGW g++ and MSVC8, which would have caught that little problem.

But thanks for letting me know about it. The sooner I know about the bugs, the better the library will be.

Deyja: You're not using the latest code from the SVN. That's why you didn't have the bug that stygeo is talking about.

stygeo: Would you mind sending me the XCode project files? I'll add them to the SVN for the next version. I hope you prepared the project files using the same directory structure as the other project files.

Cheetah3D: Actually, by downloading the code from SVN, you're closer to using version 2.7.0. ;) Also make sure to try out the support for native calling conventions on the PPC processors (not sure if it works though, but I hope so).

Regards,
Andreas

• 10
• 19
• 14
• 19
• 15