How do I create EMA programs or static simulations on HP without a C++ compiler ?

Categories:
Solution Number:
S20662
Last Modified:
2013-08-20
Issue

How do I create EMA programs or static simulations on HP without a C++ compiler ?

Solution

If you are running on HPUX systems and no not have access to a C++ compiler, you will experience problems running programs created with m3_mkema (in OPNET 6.0), op_mkema (in OPNET 7.0), or op_mksim. You will see an error like:unresolved symbol __shlinitwhen running your executable.As a workaround, you can do the following:1) Copy the following assembly code to the file cpprt0_stub.s and place it in the <opnet_dir>/<release>/sys/hp_pa_hpux/lib directory: .code ; stubs for static constructors in a.out .export __StaticCtorTable_Start,data .export __StaticCtorTable_End,data __StaticCtorTable_Start __StaticCtorTable_End .data ; stubs for static constructors in a.out, compiled with +z/+Z .export __ZStaticCtorTable_Start,data .export __ZStaticCtorTable_End,data __ZStaticCtorTable_Start __ZStaticCtorTable_EndNow cd into that directory and issue the command:cc -c -o cpprt0_stub.o cpprt0_stub.sA cpprt0_stub.o object file will be created.Now modify your bind_static_flags preference to include the following flags:-lstd -lstream -lCsup -lm -lcl -ldld <opnet_dir>/<release>/sys/hp_pa_hpux/cpprt0_stub.oYou should now be able to use the standard bind_unix (cc) program to build EMA programs and static simulations.

Environment

Compiling/Linking

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case