I have made an executable but when I run it I get error: filename: Command not found
The directory that the executable is in, is not in your path. You may run the executable by placing ./ in front of the executable name. See this to add the directory to your PATH environment variable.