NOTE: MATLAB 32 bit can interface with NetSim 32 bit only. Similarly 64-bit MATLAB can be interfaced with 64-bit NetSim only.


Following errors are assumed to be in DSR or Zigbee projects. The same applies to other projects(WLAN, TCP, UDP, CR, LTE, etc) of NetSim also.


Error1: errorLNK2001: unresolved external symbol

Description: This error will arise when some library files are missing in the Additional Dependencies of the project.  


Screenshot:  


Solution: 

Step1: Open DSR folder and double click on DSR.vcxproj.

Step2:  Under Linker Input, add the following names to the field marked ADDITIONAL DEPENDENCIES: libmx.lib; libmat.lib; libeng.lib by separating them with a semicolon.

Screenshot:


After following those above steps the error will be resolved.


Error 2: error C1083: Cannot open include file: 'engine.h': No such file or directory         

Description: This error will arise while building because no path is specified in the additional include directories of the DSR project properties.

Screenshot:


Solution: To resolve this error add <Path where MATLAB is installed>\extern\include under C/C++ Generalà ADDITIONAL INCLUDE DIRECTORIES:

Screenshot:

Error 3: error C1083: Cannot open include file: '802_15_4.h': No such file or directory    

Description: This error will arise while building because library file of ZigBee is missing inside the additional include directories of the DSR project

Screenshot:

Solution: Add “...\ZigBee” under C/C++Generalà ADDITIONAL INCLUDE DIRECTORIES:

Screenshot:

Error 4: error LNK1181: cannot open input file “libeng.lib” 

Description: Error will arise because of the unspecified path of the library files.

Screenshot:



Solution: Add <Path where MATLAB is installed>\extern\lib\win32\microsoft under LinkeràGeneralà Additional Library Directories

Screenshot:


Error 5: Intellisense: incorrectly formed universal character name

Description: Error will occur because inside fn_netsim_matlab_init() function defination the syntax of sprintf() is not correct. User can get fn_netsim_matlab_init() function definition inside MATLAB_Interface.c file.

Screenshot:

1.

2.

Solution: 

Write the sprint() function like as sprint(buf, “cd, ‘C:\\Users\\KANAK\\Desktop\\UPAL 9.1.15\\Dynamic_Clustering_9.1.15\\DSR’ ”);

Screenshot:


Error 6: error LNK1123: failure during conversion to COFF: file invalid or corrupt 

Description: User will get this error if the Enable Incremental Linking property of the project is set as “Yes”.

Screenshot:


1. 

2. 


Solution: Set Enable Incremental Linking as “No” under LinkeràGeneral

Screenshot:

 

Error 7: Error number=126 
Description: This error will come because by default only the path till the bin folder of MATLAB will get added to the path variable. i.e "C:\Program Files (x86)\MATLAB\R2011a\bin"
Screenshot:

Solution:

Modify the environment variable PATH: <Path where MATLAB is installed>\bin\win32

Screenshot:


Error 8: Binary to run NetSim backend has stopped working 

 

Description: This error generally occurs when 

NetSim is not running as Administrative mode

There is an inappropriate path of DSR folder.

Screenshot:


Solution: 

  1. Run NetSim in Admin mode, by right clicking on the NetSim shortcut icon in the desktop and selecting Run as Administrator.
  2. Change the path to your system current path where the clustering.m and Matlab_Interface.c file is present inside fn_netsim_matlab_init() under Matlab_Interface.c file.

Screenshot: 

1. 

2.