It's not exactly what you're asking for (it doesn't involve creating an executable), but you can use oplrun to execute an OPL model from the command line.
Otherwise, you can use one of the OPL APIs (i.e., C++, Java, .NET). See the examples that are included with the installer.
#CPLEXOptimizers#DecisionOptimization