07-02-2020 02:25 AM
Hello
I have one common packed library located in C:\proj\common.lvlibp
Then I develop another project that uses this dll. When I move this project to another directory he expects that relative path to common.lvlibp is maintained. Can I somehow specify that this dependency is always located in C:\proj\common.lvlibp ?
What happens when commin.lvlibp is located on C drive and my project is on D drive? Then there will be no relative path?
07-02-2020 02:52 AM
Edit,
i ve tested and seems t work correctly when
common library is located in D:\common.lvlibp
and another child is build to C:\dir\child.lvlibp later when I move child.lvlibp to another location it seems that is linked to common.lvlibp by absolute path.
Can this be done when project is build on the same drive?
07-02-2020 06:10 AM
You may not be particularly excited by this idea, but you could load it dynamically by path if you needed to.
Obviously that's more work than static linking.
I haven't tried "special" locations (vi.lib, user.lib etc) but otherwise I think you'll have to maintain the relative path. If you use those, perhaps there's a loophole (not tried, no idea if true, just a possible guess).
An alternative workaround (this basically sucks, but if needs must and you can't rebuild to relink...) is to use a Directory Junction (not symbolic link) to create an alternative path to the directory that you need. I wouldn't in general recommend this except for specific, preplanned cases. But ymmv...
07-02-2020 07:39 AM
Dynamic linking in that situation would complicate all too much.
Surprisingly it works when I reference ppl from another drive. child ppl can be moved without issues. I could create virtual drive and add directory junction between that and actual location 😄