Expected an include at the top of the header

I am following the tutorial on the page: https://docs.unrealengine.com/latest/INT/Programming/Tutorials/PlayerInput/1/index.html and although my code is exactly the same as shown I get the following error when I compile the source:

Setting up Mono
Building HowTo_PlayerInput...
Compiling with Mac SDK 10.10
Parsing headers for HowTo_PlayerInput
/Users/gobit/Documents/Unreal Projects/HowTo_PlayerInput/Source/HowTo_PlayerInput/MyPawn.h(30) : Expected an include at the top of the header: '#include "MyPawn.generated.h"'
Error: Failed to generate code for HowTo_PlayerInput - error code: OtherCompilationError (5)
UnrealHeaderTool failed for target 'HowTo_PlayerInput' (platform: Mac, module info: /Users/gobit/Documents/Unreal Projects/HowTo_PlayerInput/Intermediate/Build/Mac/HowTo_PlayerInput/DebugGame/UnrealHeaderTool.manifest).
Command /Users/Shared/UnrealEngine/4.8/Engine/Build/BatchFiles/Mac/RocketBuild.sh failed with exit code 5

Any ideas?

The #include "MyPawn.generated.h" need to be last include in header file