Orx supports the creation of your own game projects by providing a very useful script called:
c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lorxd
This is available in the root of your Orx folder. 1)
There are two commands:
init.shfor Mac or Linuxc:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lorxd
cd your way into the orx folder to try out the command.
When typing the
init command above, depending on what operating system you are on, you will receive the following output:
c:\Work\orx>init == Not enough arguments:  == Usage: c:\Work\orx\init.bat name = name: Project name, relative or full path, required
You only need to specify a path in order to create and name a project. For example:
c:\Work\orx>init c:\temp\my-new-game-project [ 12:56:59 ] Initializing [ my-new-game-project ] in [ c:\temp\ ] [ 12:56:59 ] == Creating files: + my-new-game-project\.editorconfig + my-new-game-project\build\premake4.lua + my-new-game-project\data\config\my-new-game-project.ini + my-new-game-project\data\config\my-new-game-projectd.ini + my-new-game-project\data\config\my-new-game-projectp.ini + my-new-game-project\data\sound\appear.ogg + my-new-game-project\data\texture\logo.png + my-new-game-project\src\my-new-game-project.cpp [ 12:57:01 ] Generating build files for [ windows ]: * gmake Building configurations... Running action 'gmake'... Generating windows/gmake/Makefile... Generating windows/gmake/my-new-game-project.make... Done. * codelite Building configurations... Running action 'codelite'... Generating windows/codelite/my-new-game-project.workspace... Generating windows/codelite/my-new-game-project.project... Done. * codeblocks Building configurations... Running action 'codeblocks'... Generating windows/codeblocks/my-new-game-project.workspace... Generating windows/codeblocks/my-new-game-project.cbp... Done. * vs2013 Building configurations... Running action 'vs2013'... Generating windows/vs2013/my-new-game-project.sln... Generating windows/vs2013/my-new-game-project.vcxproj... Generating windows/vs2013/my-new-game-project.vcxproj.user... Generating windows/vs2013/my-new-game-project.vcxproj.filters... Done. * vs2015 Building configurations... Running action 'vs2015'... Generating windows/vs2015/my-new-game-project.sln... Generating windows/vs2015/my-new-game-project.vcxproj... Generating windows/vs2015/my-new-game-project.vcxproj.user... Generating windows/vs2015/my-new-game-project.vcxproj.filters... Done. * vs2017 Building configurations... Running action 'vs2017'... Generating windows/vs2017/my-new-game-project.sln... Generating windows/vs2017/my-new-game-project.vcxproj... Generating windows/vs2017/my-new-game-project.vcxproj.user... Generating windows/vs2017/my-new-game-project.vcxproj.filters... Done. [ 12:57:01 ] Init successful!
init command will create a folder
my-new-game-project in the folder path specified and will give you the following sub-directories:
build will contain builds for all the IDEs for your operating system. Just pick the one you want to use.
data contains some sample config files, sounds and textures.
src contains a basic setup source file.
You don't need to bring in the
lib folders from the Orx folder. Your $(ORX) variable will enable your project to see those dependencies from the Orx folder automatically. Therefore your project can be created anywhere, and will still compile fine.
In the same way, you don't need to manually copy over orx*.dll files (or orx*.so) files, as your project is already configured to copy these into the
bin folder for you on each compile.
That's about it. A lot of work has gone into making this as bullet proof as possible, so you should have no trouble spinning up new projects whenever you need one.
If you receive an error something like: c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lorxd
This is because you did not compile Orx itself first. Orx needs to be compiled so that projects created with
init can make use of Orx's dll(s) that reside there. If they are missing you will get linker errors trying to find orx.dll or orx.so libraries.