User Tools

Site Tools


en:tutorials:orx:mac:setting_up_a_project_on_mac

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:orx:mac:setting_up_a_project_on_mac [2018/05/31 19:22 (6 years ago)] sausageen:tutorials:orx:mac:setting_up_a_project_on_mac [2024/02/27 18:56 (4 weeks ago)] (current) – debug64 -> debuguniv64 iarwain
Line 3: Line 3:
 This is the third article in a series for Orx on Mac OS X. This is the third article in a series for Orx on Mac OS X.
  
-The [[en:orx:mac:setting_up_dev_on_mac|first article]] helped the user set up their Mac for development by downloading the //Xcode Commandline Developer Tools// which gives the user the GCC compiler, the ''git'' command, and a MacOSX SDK.+The [[en:tutorials:orx:mac:setting_up_dev_on_mac|first article]] helped the user set up their Mac for development by downloading the //Xcode Commandline Developer Tools// which gives the user the GCC compiler, the ''git'' command, and a MacOSX SDK.
  
-The [[en:orx:mac:cloning_and_building_orx_on_mac|second article]] guided the user how to compile the Orx library.+The [[en:tutorials:orx:mac:cloning_and_building_orx_on_mac|second article]] guided the user how to compile the Orx library.
  
 This article will teach how to create your own game project using the Orx tools and Orx library. This article will teach how to create your own game project using the Orx tools and Orx library.
Line 66: Line 66:
 Use Finder to take a look at the structure of your game folders: Use Finder to take a look at the structure of your game folders:
  
-{{ :en:orx:mac:my-game-folder.jpg |}}+{{ tutorials:orx:mac:my-game-folder.jpg |}}
  
 Your project can be compiled and developed in any of these IDE's (or a text editor in the case of gmake). We'll use gmake because if you have been following the series with a clean Mac, gcc/make is what we have. Your project can be compiled and developed in any of these IDE's (or a text editor in the case of gmake). We'll use gmake because if you have been following the series with a clean Mac, gcc/make is what we have.
Line 75: Line 75:
   - type: ''make''   - type: ''make''
  
-(the above is the same as typing the default of: ''make config=debug32''+(the above is the same as typing the default of: ''make config=debuguniv64''
  
 You'll see your game compile with: You'll see your game compile with:
  
 <code> <code>
-==== Building orxLIB (debug32) ==== +==== Building orxLIB (debuguniv64) ==== 
-Creating obj/x32/Debug/orxLIB+Creating obj/x64/Debug/orxLIB
 orxPlugin_EmbeddedList.cpp orxPlugin_EmbeddedList.cpp
 orxAnim.c orxAnim.c
Line 91: Line 91:
 orxTree.c orxTree.c
 Linking orxLIB Linking orxLIB
-ld: warning: directory not found for option '-L/usr/lib32'+ld: warning: directory not found for option '-L/usr/lib64'
 Running post-build commands Running post-build commands
 cp -f ../../../lib/dynamic/liborx*.dylib ../../../bin cp -f ../../../lib/dynamic/liborx*.dylib ../../../bin
-==== Building orx (debug32) ==== +==== Building orx (debuguniv64) ==== 
-Creating obj/x32/Debug/orx+Creating obj/x64/Debug/orx
 orxMain.c orxMain.c
 Linking orx Linking orx
-ld: warning: directory not found for option '-L/usr/lib32+ld: warning: directory not found for option '-L/usr/lib64
-==== Building Bounce (debug32) ==== +==== Building Bounce (debuguniv64) ==== 
-Creating obj/x32/Debug/Bounce+Creating obj/x64/Debug/Bounce
 orxBounce.c orxBounce.c
 Linking Bounce Linking Bounce
-ld: warning: directory not found for option '-L/usr/lib32'+ld: warning: directory not found for option '-L/usr/lib64'
 </code> </code>
  
Line 124: Line 124:
   * Type: ''./MyGamed''   * Type: ''./MyGamed''
  
-{{ :en:orx:mac:run-mac-game-template.jpg |}}+{{ tutorials:orx:mac:run-mac-game-template.jpg |}}
  
 You're all done! Congratulations on compiling the Orx library, and your very first Orx game project. You're all done! Congratulations on compiling the Orx library, and your very first Orx game project.
  
 You might be interested to move onto the [[en:guides:beginners:main|Beginner's Tutorial]] and create a platform game. You might be interested to move onto the [[en:guides:beginners:main|Beginner's Tutorial]] and create a platform game.
 +
 +===== Troubleshooting =====
 +
 +MacOS varies in it's treatment of environment variables, So depending on which MacOS version or Codelite version you have, you may need to perform some extra steps.
 +
 +
 +==== Environment Variable Problems ====
 +
 +If when trying to compile you may get an error similar to the following:
 +
 +<code>
 +cp: /Users/xxxx/Documents/orx/code/no/lib/dynamic/liborx*.dylib: No such file or directory
 +make: *** [PostBuild] Error 1
 +</code>
 +
 +or
 +
 +<code>
 +/Users/xxxx/Documents/simplescroll/src/simplescroll.cpp:6:10: fatal error: 'orx.h' file not found
 +#include "orx.h"
 +         ^~~~~~~
 +</code>
 +
 +This one is generally caused by the ''$ORX'' environment being set, however, the MacOS version or Codelite version not honouring the variable. In this case, you need to set the variable within Codelite.
 +
 +To do this, go to: Settings / Environment Variables
 +
 +Add the following line:
 +
 +  ORX=/Users/canberra-air/Documents/orx/code/
 +
 +==== Debugging Problems ====
 +
 +When trying to run the debugger you may get a dialog box saying:
 +
 +  Failed to locate gdb at ‘gdb’
 +
 +Right click on your project. Then go to ''General'' / ''Debugger'' property (not the Debugger section), Switch from ''GCC Debugger'' to ''LLDB Debugger''.
en/tutorials/orx/mac/setting_up_a_project_on_mac.1527819765.txt.gz · Last modified: 2018/05/31 22:22 (6 years ago) (external edit)