Simulation bind errors: When I run a simulation, an error is reported LNK2001: Unresolved External Symbol, OR error loading object file and fatal: relocation error: file <file>: symbol (<symbol>).What should I do?

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

Simulation bind errors: When I run a simulation, an error is reported LNK2001: Unresolved External Symbol, OR error loading object file and fatal: relocation error: file <file>: symbol (<symbol>).What should I do?

Solution

Often you may see an error like the following:| error loading object file (foo-bar.s1.nt.so) || ld.so.1: op_runsim: fatal: relocation error: file foo-bar.s1.nt.so: symbol connection_type:referenced symbol not found |Any time you see an error stating fatal: relocation error: and referenced symbol not found, it means that there is a function call or variable reference in your simulation (all combined into a single shared library with the name <project>-<scenario>.<architecture>.nt.so) that is not defined in any of the code in the library or in any part of the OPNET Simulation Kernel.A relocation error means that the simulation references a symbol (function name or variable name) that cannot be found in any of the code being linked into the simulation. Common causes of this problem are misspelling a function or variable name (e.g. 'op_pk_pront' instead of 'op_pk_print'), or referencing a function or variable from a process or external object file that is not being included in the simulation.1. Make sure that the function or variable in question is spelled correctly.2. Make sure that you are including any necessary libraries, process models, and external object files in your simulation. Process models are included by having a node that contains a module that references the particular process of interest. External object files are declared in the process models where they are used (File->Declare External Files). You can also associate external object files by declaring them from the Configure Simulation dialog box in the Project Editor.External libraries can be linked into a simulation by including their names in the bind_shobj_libs or bind_static_libs preference setting.If you have further questions, please contact OPNET Technical Support.

Environment

DES Kernel->Error Messages/Logs

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