WSTP: Problems encountered while compiling using mcc

Hi,

I am trying to follow this documentation: Setting Up External Functions to Be Called from the Wolfram Language—Wolfram Documentation

When I first tried to do mcc -o f.exe f.tm f.c I got an error: f.c: f.c:3:18: fatal error: wstp.h: No such file or directory.
I fixed that error by #include "/usr/local/Wolfram/Mathematica/10.4/SystemFiles/Links/WSTP/DeveloperKit/Linux-x86-64 /CompilerAdditions/wstp.h" in f.c file.

Then, I got another error: cannot find -luuid , which I fixed by installing these three things :
sudo apt-get install uuid-dev

sudo apt-get install libxmu-dev libxi-dev

sudo apt-get install libx11-dev

Now, I have this new error, which I don’t know how to fix:
f.o: In function main’:
f.c:(.text+0x30): undefined reference to WSMain' collect2: error: ld returned 1 exit status

Could someone please help me out?

Operating system info:
Distributor ID: Ubuntu Description: Ubuntu 14.04.4 LTS Release: 14.04 Codename: trusty

g++ version : (Ubuntu 4.8.4-2ubuntu1~14.04.1)