# Sharing libs between desktop and helper apps

**URL:** <https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621>\
**Category:** General\
**Created:** [December 1, 2014, 11:21pm UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621 "2014-12-01T23:21:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Truskier](https://forum.xojo.com/user_avatar/forum.xojo.com/peter_truskier/32/243_2.png) [@Peter\_Truskier](https://forum.xojo.com/u/Peter_Truskier)\
**Post date:** [December 1, 2014, 11:21pm UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/1 "2014-12-01T23:21:58Z")

</div>

I have a cross platform project (Mac and Windows) which uses a helper app. Both the desktop and helper apps use the same fairly large library (DynaPDF). Any suggestions about the easiest way to minimize deployed file size by including the library only once? I’m planning to try a symbolic link or alias on Mac OS and a shortcut on Windows.

Will this work? Any better ideas?

Thanks…

---

<div class="post-metadata">

**Author:** ![Wayne\_Golding](https://forum.xojo.com/user_avatar/forum.xojo.com/wayne_golding/32/165_2.png) [@Wayne\_Golding](https://forum.xojo.com/u/Wayne_Golding)\
**Post date:** [December 2, 2014, 1:01am UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/2 "2014-12-02T01:01:29Z")

</div>

Have a look at [http://www.xojo.com/blog/en/2014/08/the-libs-folder.php](http://www.xojo.com/blog/en/2014/08/the-libs-folder.php)

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [December 2, 2014, 1:17am UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/3 "2014-12-02T01:17:27Z")

</div>

In theory it should be possible, I don’t know about Windows. I’m hoping to add such a feature to App Wrapper in the future. On OS X I would recommend using relative symbolic links, these are easy to make and fairly resilient.

Aliases are now bookmarks and bookmarks are bloated files (sometimes a bookmark can be 1mb, just for a link to another file).

---

<div class="post-metadata">

**Author:** ![Peter\_Truskier](https://forum.xojo.com/user_avatar/forum.xojo.com/peter_truskier/32/243_2.png) [@Peter\_Truskier](https://forum.xojo.com/u/Peter_Truskier)\
**Post date:** [December 2, 2014, 1:21am UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/4 "2014-12-02T01:21:01Z")

</div>

Thanks for the pointer, Wayne. Now that you’ve brought it up, I seem to remember reading that when it was posted (and then apparently forgetting about it).

It’s not clear to me from that article what the rules are about where the apps look for their libraries. Is it in any folder with “Libs” in its name with a preference for “appName Libs?” ?

If so, then the answer for my Windows build is straightforward.

And thank you, Sam. My thought was to try the symbolic link first. I’ll post back here once I try it out…

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [December 2, 2014, 1:25am UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/5 "2014-12-02T01:25:15Z")

</div>

> [@147325:@Peter Truskier](#):
>
> And thank you, Sam. My thought was to try the symbolic link first. I’ll post back here once I try it out…

Make sure it’s a relative link, when you call the function pass in the relative path, otherwise you’ll end up with an application that’ll only work if it on your computer!

---

<div class="post-metadata">

**Author:** ![Peter\_Truskier](https://forum.xojo.com/user_avatar/forum.xojo.com/peter_truskier/32/243_2.png) [@Peter\_Truskier](https://forum.xojo.com/u/Peter_Truskier)\
**Post date:** [December 2, 2014, 1:31am UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/6 "2014-12-02T01:31:43Z")

</div>

Right…

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [December 2, 2014, 1:33am UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/7 "2014-12-02T01:33:47Z")

</div>

I made this mistake in the past when embedding QuickLook previews into document files, the moment a user renamed or moved the file, the preview disappeared! Oops!

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [December 2, 2014, 1:35am UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/8 "2014-12-02T01:35:25Z")

</div>

> [@147325:@Peter Truskier](#):
>
> Is it in any folder with “Libs” in its name with a preference for “appName Libs?” ?

No, it’s literally “Libs”. The 3 places it looks are

appName Libs  
Libs  
./

I don’t know what order it looks at them.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [December 2, 2014, 2:07am UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/9 "2014-12-02T02:07:05Z")

</div>

The easiest cross platform way to get to your Libs/Resources folder is with TPSpecialFolders. Sam has helped make the Mac side declare-accurate, and the Windows side will check for both AppName Libs and Libs in case you change the folder name 🙂

[https://forum.xojo.com/15318-modules-for-you-updated-9-28](https://forum.xojo.com/15318-modules-for-you-updated-9-28)

---

<div class="post-metadata">

**Author:** ![Peter\_Truskier](https://forum.xojo.com/user_avatar/forum.xojo.com/peter_truskier/32/243_2.png) [@Peter\_Truskier](https://forum.xojo.com/u/Peter_Truskier)\
**Post date:** [December 2, 2014, 6:04pm UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/10 "2014-12-02T18:04:28Z")

</div>

Thanks to both of you Tims! Very helpful…

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:30pm UTC](https://forum.xojo.com/t/sharing-libs-between-desktop-and-helper-apps/20621/11 "2020-10-29T17:30:33Z")

</div>


