Were there any actual error outputs from the compiler (as opposed to warnings) that seemed to say that the compile could not be finished and the output could not be created? Otherwise, you should definitely have some kind of file called scanport2, even if it's riddled with bugs.
It sounds like your problems could be caused by permissions. When a file's created it won't be executable by default; you'll have to run the chmod command on it (e.g. "chmod +x filename") before you can execute it. In addition, the current directory isn't in the path by default in Linux, so you'd have to run "./scanport2" to run your file.
If these don't work, can you show the output of "ls -l" in the directory you compiled in.