This article is a short guide on building orx from scratch using an IDE of your choice (VisualStudio, Codelite, XCode etc) on an operating system of your choice (Windows, Linux, Mac, Android etc).
When you clone a copy of the very latest orx, look in the \orx\code\build folder. In here you will see folders to Windows, Linux, Android etc. And in these folders, you'll find subfolders to VisualStudio2010, Codelite, CodeBlocks, XCode, jni, etc.
These are build projects. With previous releases of orx, there were several build projects for some IDEs but not all. Premake now builds these Projects for us, for your chosen operating system and editor.
Your build may not exist in these folders, but you can create it. Then you can build orx for your own project.
This article assumes that you are using the latest releases of orx (using the bitbucket repository).
Step 1: cd your way into the build output folder:
Step 2: run premake and specify the editor your want to create a build project for (in this case, windows codelite):
Your project for building orx from scratch will now be created.
Step 1: Start up your IDE, eg (codelite) and load the orx workspace or solution in the build project you just made.
Step 2: You'll most likely want embedded versions of orx, so compile the “Embedded Dynamic Debug”, “Embedded Dynamic Profile” & “Embedded Dynamic Release” versions.
Step 1: Copy the tutorial folder as a basis for your own project.
Step 2: Copy the orx\code\lib\dynamic *.dll(s) into a lib subfolder in your project folder. lib is on the same folder level as bin & data.
Step 3: Copy the orx\code\bin\ *.exe(s) into the bin subfolder in your project folder. bin is on the same level as lib.
Step 4: Copy the entire orx\code\include folder into your project folder so that include is on the same level as lib and bin.
To get a list of all possible combinations, do a:
extern\premake\bin\windows\premake4 –help (dash dash help)
At the current time, the available oses are: OpenBSD, NetBSD, or FreeBSD Haiku Linux Apple Mac OS X Solaris Microsoft Windows
And the available build projects are: codeblocks codelite gmake vs2002 vs2003 vs2005 vs2008 vs2010 vs2012 vs2013 xcode3 xcode4
There's some interesting architectures there as well.
If you are building under Linux, you may possibly encounter this error while trying to compile
/usr/bin/ld: cannot find -lsndfile
You require the libsndfile-devel package. For Fedora:
yum install libsndfile-devel
… will set you straight. Similar command for other Linux flavours.
A further mention (xcode specific and premake) can be found here: Compiling and Building ORX