I followed the manual exactly in order to try to compile the 'addtwo' example before continuing:
https://reference.wolfram.com/language/tutorial/WSTPDeveloperGuide-Macintosh.html
I'm however not an expert in compiling/c++, but after long fiddling around I found out that the makefile is incorrect, and I had to change two lines to make it work, original:
CADDSDIR = ${WSLINKDIR}/${SYS}/CompilerAdditions
MATHLINK_LIB = -lMLi4
changed:
CADDSDIR = ${WSLINKDIR}/${SYS}/CompilerAdditions/AlternativeLibraries
MATHLINK_LIB = -lWSTPi4
Then using commands as provided in the documentation worked:
wsprep addtwo.tm -o addtwotm.c
make addtwo
I have a feeling more people will have this problem, so I'd better post it here. I'm not sure if this is erroneous in the documentation or machine-specific.