Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated

Why do I receive Error Code: -17709 when calling a LabWindows™/CVI Code Module from TestStand?



Primary Software:
Primary Software Version: 4.2.1
Primary Software Fixed Version: N/A
Secondary Software: LabWindows/CVI Development Systems>>Full Development System, LabWindows/CVI Development Systems

Problem:
I have configured a step that uses the LabWindows/CVI Adapter to call a function in a LabWindows/CVI compiled .obj or .lib code module and when I attempt to execute my sequence, I receive the following error:

Unable to get standard CVI step module address for ‘function_name’.
The following functions or variables are referenced by the code module, but could not be found. You might need to include additional libraries, or instrument driver files in the tscvirun project or Autoload Libs directory to ensure that the module is loadable: __CVI_Internal_Demo_Specifier, __CVI_Internal_Linkage_Specifier, __CVI_Internal_Toolkit_Demo_Name

Error Code -17709, A CVI code module has unresolved external references.

Why do I encounter this error?



Solution:
Note: As of TestStand 2013, calling non-DLL code modules, including .obj and .lib files, is no longer supported by the LabWindows/CVI Adapter. To use this code in TestStand 2013 or later, you must first compile it into a DLL.

When the LabWindows/CVI Adapter loads and executes a function in an .obj or .lib code module, the LabWindows/CVI runtime engine must dynamically link the compiled code module and resolve all external symbols referenced by the code module. In the LabWindows/CVI Adapter configuration dialog box, you can configure a list of support libraries that the LabWindows/CVI Adapter loads before loading and executing object and library code modules. The configuration dialog box stores the libraries in the <TestStand>\AdapterSupport\CVI\AutoLoadLibs  directory. If a code module references a symbol that is not defined in any loaded library, the adapter returns the above error.

If the AutoLoadLibs directory is empty when the LabWindows/CVI Adapter loads a .obj or .lib code module, the adapter automatically copies to the AutoLoadLibs directory a default set of libraries from the LabWindows/CVI installation directory, and one of these libraries is cvistart.lib. As of LabWindows/CVI 2009, the three symbols mentioned above are no longer included in cvistart.lib, so the LabWindows/CVI Adapter fails to load a code module if the code module was compiled with an earlier version of LabWindows/CVI.

You will typically encounter the above mentioned error if you recently moved to a new machine where you installed LabWindows/CVI 2009 or newer, or if you recently upgraded to LabWindows/CVI 2009 or newer and deleted the files from the AutoLoadLibs directory or you updated the files using the LabWindows/CVI Adapter Configuration dialog box.

Perform the following steps to resolve this error:

  1. Exit your TestStand application
  2. Download the attached cvi_2009_internal_symbols.obj  file and place the file in the <TestStand>\AdapterSupport\CVI\AutoLoadLibs directory for the version of TestStand you are currently using
  3. Launch your TestStand application and run the test again

If you have followed the above suggestions and are still encountering this error, please contact National Instruments Support.



Related Links:
KnowledgeBase 4G9B1KQX: TestStand Cannot Load Object or Library Files for LabWindows/CVI Adapter

Attachments:
Error.png
cvi_2009_internal_symbols.obj




Report Date: 01/28/2010
Last Updated: 08/05/2013
Document ID: 55RG9K6X

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit