These notes refer to OPNET version 11.5 (I still have to upgrade to the latest version), on linux.
The procedure:
- open the scenario you want to compile
- click on "run simulation", this will open the simulation dialog, click on "simulation set info"
- here you will find the command opnet will execute to launch your simulations (something like op_runsim ...) - copy it, paste it in a text editor, delete all carriage returns so that it is on a single line
- in the command, substitute the word op_runsim with op_mksim
- open a shell (bash in linux, cmd in windows), go to your project's directory, and execute the command you obtained (to give an example, op_mksim -opnet_user_home . -net_name sample -noprompt -kernel_type development could be such a command)
- opnet will start compiling and linking your simulations, in the last lines of output it will tell you the name of the produced executable (e.g., something like op_mksim: Simulation (./op_models/sample.dev32.i1.sim) Produced)
- to execute it, substitute its name to "op_mksim" and start the simulation (example: ./op_models/sample.dev32.i1.sim -opnet_user_home . -net_name sample -noprompt -ef sample)
Next time I'll also show some example of how to use valgrind against opnet executables, although that is quite straightforward.