LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL's path does not work

 I encountered a strange thing of dll usage today.

I made a path variable and was sure it is the DLL's path,then I link the path variable to the CLF node, and specify the path in diagram.

Then error appears, complaining that it can not find the DLL(outside symbol or relay relationship lost,or valid file format, so dll is not loaded).

微信截图_20180423165143.png

I add a front box , to ensure if the file path is wrong ,see as below:

微信截图_20180423165807.png

 

the path is right.then I double click the CLF node.微信截图_20180423170314.png

 

Oh,my God,what is wrong? why did not the path take effect ? 

 

0 Kudos
Message 1 of 5
(2,511 Views)

Hi,

 

        The best thing is to keep the path static. Remove the option "specify path on the diagram". Also check the Input and output variables for the dll.

0 Kudos
Message 2 of 5
(2,494 Views)

You mean , I should copy the dll to system32 folder and call it by a fixed path ?

 

 

otherwise I should remove the option "specify path on the diagram" and build the folder structure in develop mode as well as after I build exe ? i.e. make a  data folder in the same path of .lvproj file and put dll file into it ?  if I do not make a folder same as after build exe, error will appear , see as https://forums.ni.com/t5/LabVIEW/quot-NO-outside-functions-DLL-in-VI-quot-error-appear-after-run/m-p...

0 Kudos
Message 3 of 5
(2,464 Views)

Hi,

  

          The best thing is to drop the dll in system32 folder and create a static path from it. But if your purpose is an exe then create a separate folder in the project and specify the fodler while building and create exe. 

In any case if  u plan to create the path static you have to remove the option  "specify path on the diagram".

0 Kudos
Message 4 of 5
(2,450 Views)

The path from the diagram can be used to overrule the path that is configured in the CLFN. The CLFN path will not change. It will be used if the path from diagram is removed.

 

Setting the path from code will not change how the CLFN is configured.

 

It's perfectly OK to put .dll's in subdirectories of the application. I would personally not advice to put them in the system32 directory, unless they are shared by multiple applications.

0 Kudos
Message 5 of 5
(2,439 Views)