06-20-2024 01:50 PM
Is there a way to specify an absolute path in an *.lvproj file?
I have a DLL that is used as an input to a Call Library Function node.
The DLL file is located in the same folder location on different computers. Yet, on those different computers some are setup with the lvproj file in a different folder path. Thus, when LV tries to find the DLL file it cannot find it easily and reports that it is missing.
06-20-2024 03:19 PM
I have this workaround:
store the proper path in a sub.vi (or a global variabel, which is a glorified .vi with a frontpanel but no blockdiagram),
apply "specify path on diagram" in the CLF node,
read the path from the sub.vi as input for path-CLF
repeat for each CLF node...
06-21-2024 12:58 PM
I understand your work-around but it is not quite solving my issue.
Reason I have the dll in the project is so that it can be included in the Installer.
06-21-2024 07:26 PM
Hi Mark,
2 Solutions:
1. Put all your projects at the same path relatively to your dll folder, on every computer. Simple and easy.
2. Add your absolute dll folder at the top of your LabVIEW search paths (needs to be done for each LabVIEW installation):
The dll will be found automatically, however you may still have a warning dialog when opening your caller VIs, because the relative path of the dll has changed:
This code could be executed when LabVIEW starts through a project provider.
However, this is a private (unsupported) feature, so it is at your own risks.
Regards,
Raphaël.
06-22-2024 06:37 AM
@Mark_L wrote:
I understand your work-around but it is not quite solving my issue.
Reason I have the dll in the project is so that it can be included in the Installer.
oh, sorry, I didn't get that
@Mark_L wrote:
The DLL file is located in the same folder location on different computers. Yet, on those different computers some are setup with the lvproj file in a different folder path.
do you put put all your projects at the same path relatively to your dll folder, on every computer, as was suggested?
07-01-2024 09:55 AM
Looks like there is not a way to enforce an absolute path. I understand the idea of changing the Search Paths in Options. But posting a warning is not acceptable.
Thanks for your help.
07-01-2024 09:56 AM
I am not able to put all projects at the same path relatively to the dll folder. Thus, the reason for the original post.
Thanks for your help.
07-01-2024 10:27 AM
Specify a post-build VI in the build properties. Have that VI move the just-installed .dll to the desired location.
07-01-2024 10:44 AM
@paul_a_cardinale wrote:
Specify a post-build VI in the build properties. Have that VI move the just-installed .dll to the desired location.
You can do that for an executable, but not for an installer of an executable.
To be included in the installer, the files must belong to the project tree or to the statically known built files of an executable.
07-02-2024 07:11 AM
Define a Destination pointing to [System]\dll-folder
Set your DLL to land in that folder.
It should work.