{Compiler} is the path to CodeWarrior, usually C:\Program Files\CodeWarrior
{Project} is the path to the project you create
{GapiDraw} is the path to the GapiDraw SDK

* Create a new empty project.

* In the directory you choose for your new project, create the directories
	Src 	- for sourcecode
	Rsc 	- for resources
	Debug 	- for output of the debug prc
	Release - for output of the release prc 

* Change the project settings (Edit->project settings or Alt+F7)

	In the project Settings dialog change the following
	
	* Target Settings
		Set target name to "Debug"
		Set linker to "Palm OS 68K"
		Set the output directory to "{Project}Debug" (select the Debug directory you created)
	
	* Access Paths
		Under "User Paths"
			Add "{GapiDraw}\include\palm"
			Add "{GapiDraw}\lib\palm"
		Under "System Paths"
			Change "{Compiler}" to "{Compiler}Palm OS Support"
			Add "{Compiler}CW for Palm OS Support"
		
	* Palm OS 68K Target
		Set File Name to your projects name
		Set Application Name ('tAIN') to the same

	* PRC File Settings
		Change Creator to a four letter combination (can't be all small),
		you cannot use the same combination as any other application on the palm, this will
		cause one of the applications to disapear. For testing, you can keep STRT as the Creator.

	* C/C++ Language
		Make sure only the following options are checked
		* Force C++ compilation
		* Enable bool Support
		* Enable wchar_t Support
		* Inline Depth: Don't Inline
		* Reuse Strings
		* Require Function Prototypes
		Naturally, you can change these settings to meet your needs, if something does not agree with
		GapiDraw, this will become apparent when you try to compile.
		
	* C/C++ Warnings
		Some of these settings will cause warnings with GapiDraw, but since they are just warnings
		the only effect it can have is to be annoying. It is usually sufficient to select the following.
		* Possible Errors
		* Unused Variables
		* Extended Error Checking
		* Hidden Virtual Functions

	* 68K Processor
		Set Code Model to Smart
		Select 4-byte 'int' (this is a must since GapiDraw was compiled with this option)
		Let the other options stay as they were
	
	* Palm OS Debugging
		Change the Emulator to one of your choice or set it to Device if you preffere

* Create the groups (Project->Create group)
	Resources
	Headers
	Source
	Libraries
	Release
	Debug
  Drag Release and Debug to Libraries

* Create a resource file (PalmOS->Launch PilRC Designer) if you need any resources
  Put all bitmaps/resourcefiles/... in {Project}\Rsc
  You can copy a rcp  file from one of the examples to get a hint on how it is suppose to look.
  Since this is just a textfile, you can do it manually if you don't like the PilRC designer

* Copy your source files to {Project}\Src if you got any yet	

* Add files to the project
	Right click Libraries and add the files
		* {GapiDraw}\lib\palm\ARMC0001.bin
		* {GapiDraw}\lib\palm\gd301.lib
		* {Compiler}\Palm OS Support\CodeWarrior Libraries\Palm OS Glue\PalmOSGlue.lib
		* {Compiler}\Palm OS Support\CodeWarrior Libraries\Runtime\PalmOSRuntime_4i_A5.lib
	Right click Debug and add the file
		* 
	Add all source files from {Project}\Src to Source
	Add {GapiDraw}\include\palm\GapiApplication.cpp to Source if you intend to use this
	Add all header files from {Project}\Src to Headers
	Add {Project}\Rsc\<your resource files> to Resources

* Select the Segments tab
	Create a new segment (Project->Create segment)
	Drag ARMC0001.bin and gd301.lib to the new segment

* Select the Targets tab
	Create a new target (Project->Create target)
	* Set the name for the new target to Release
	* Select Clone existing target (Debug)

* Select the Files tab
	Add the file {Compiler}\CW for Palm OS Support\MSL\MSL_C++\MSL_Palm_OS\Lib\68K\MSL_C++_PalmOS_4i.lib
	to the Release group, make sure you only check Release in the question you get.
	Add MSL_C++PalmOS_4i_Dbg.lib to Debug in the same way.

* Select the Release target in the box above the tabs and hit Alt+F7 to change the settings for this target.
	Under C/C++ Language
		* Set Inline Depth to Smart
		* Check Auto-Inline, Deferred Inlining and Bottom-up Inlining
	Unckeck 68K Processor -> Generate A6 Stack Frames
	Under Global Optimizations, set the level to 4

Thats it, it should work. If you use a resourcefile from a sample, you need to compile two times since the compiler
automatically generates a header for the resource.
	
	

		
				