04-23-2018 04:03 AM
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).
I add a front box , to ensure if the file path is wrong ,see as below:
the path is right.then I double click the CLF node.
Oh,my God,what is wrong? why did not the path take effect ?
04-23-2018 05:11 AM
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.
04-23-2018 08:41 PM
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...
04-24-2018 01:54 AM - edited 04-24-2018 01:56 AM
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".
04-24-2018 09:11 AM
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.