Just to explain:
Your app was probably a CFM binary, and CFM binaries need a to be launched using a wrapper application because the native binary format on OS X is Mach-O. The wrapper application is called LaunchCFMApp, and is located here:
/System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp
You can either do /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp
./myprog
or
open myproj
because open uses LaunchServices or similar and can tell that it's a CFM binary so it can take the correct steps to launching it.