LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicated path error when building lvlibp

I built a A.lvlibp file which linked a DLL. I checked both the "Excluded dependent packed libraries" and "Excluded dependent shared libraries" checkboxes, but the DLL still was generated.

When I built B.lvlibp file which depended on A.lvlibp, and the checkboxes  "Excluded dependent packed libraries" and "Excluded dependent shared libraries" were checked. The error "Cannot build the application because the following source files are in the destination directory. You must build the application to a different directory from the source files." was generated. And the duplicated file was the DLL A.lvlibp linked.

I built the A.lvlibp and B.lvlibp to a same folder. I think there shouldn't be the error because I checked both  "Excluded dependent packed libraries" and "Excluded dependent shared libraries".

Could you help me solve the problem?

Thanks a million!

Message 1 of 4
(2,161 Views)

I also want to know the answer.

Message 2 of 4
(2,125 Views)

如果调用库函数节点通过路径引用DLL,那么所有构建规范(不仅仅是打包的项目库)都会将DLL复制到构建位置。如果CLF节点仅以名称引用DLL,它将不会复制DLL,但应该在系统搜索路径中索引DLL,但这种方法可能会导致错误。

除上述方法外,您还可以:

1。将VIs保存在一个普通的库中,但是将其设置为private和设置密码来保护库。这将阻止开发人员查看源代码。

2。将DLL添加到项目中。在构建规范中,选中Source File Settings下设置重命名文件”选项。这将防止任何链接问题(应该可以解决您提到的Linking problem)。

0 Kudos
Message 3 of 4
(2,097 Views)

多谢回复!

因为我是用的.net constructor调用的该DLL,只能通过路径选择,所以构建A.lvlip的同时会将DLL文件复制到指定路径我可以理解,但当我构建另一个打包项目库B.lvlibp时,新的项目库并没有直接调用该DLL的任何方法,只是调用了A.lvlibp的方法,但构建输出的文件中却包含了DLL。这就造成了当我把所有构建都指定到同一个目录时,造成了DLL文件的冲突。我已用抽象类的方式暂时规避了这个问题,但还是不知道这是什么原因。

0 Kudos
Message 4 of 4
(2,078 Views)