Andrew,
The files you posted do not download on my system (a forum bug? damaged pdfs?) so I can't help you specifically but the best place to start is to compile the tutorial examples and modify them to suit your needs.
You should start with Macintosh specific documentation.
Have you already compiled and tried the addtwo example program? The examples are located in the following directory on the Mac:
/Applications/Mathematica.app/Contents/SystemFiles/Links/WSTP/DeveloperKit/MacOSX-x86-64/WSTPExamples
I previously posted an example here with a notebook that does the compiling for you on this thread: http://community.wolfram.com/groups/-/m/t/1099677
Hope this helps. If you repost your example in a way that is readable, I might be able to help more.
Regards