Question: For some reason when I try to compile my code, I get this error:

fatal error: direct.h: No such file or directory
compilation terminated.

I'm on linux using g++ (GCC) 4.6.0 20110509 (Red Hat 4.6.0-7)

Answer: 
Commonly, is a C/C++ header file provided by Microsoft Windows, so it cannot works in linux.

[reference at wikipedia](https://en.wikipedia.org/wiki/Direct.h)

You can use unistd.h to replace the actions in direct.h like mkdir, rmdir, etc.
I took SWMM5 source code and modify the files following the readme and some small fixes. It seems in linux you do not need direct.h at all for the CLE version. I have tested several of the examples provided by EPA
<https://www.epa.gov/sites/production/files/2014-05/epaswmm5_apps_manual.zip>

You can get the files [from here](https://drive.google.com/open?id=0B6SXwdLnLLLYUjFyZnZzdHBOWnM).

Let me know if something is not working.