<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Proper way of including Dynamic Libraries in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241695#M4974</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;What is the proper way to install an add-on which uses Dynamic Libraries? (DLL on Windows, dylib on OSX).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Specifically on OSX: should they be embedded in the Bundle? Or placed in the same folder as the bundle? In the ArchiCAD Root or Support folder?&lt;BR /&gt;&lt;BR /&gt;e.g. I see for the Rhino add-in, that the "dylib" for OpenNURBS is installed in the ArchiCAD Support folder and that the library has an @rpath/ install name.&lt;BR /&gt;&lt;BR /&gt;Are we allowed to put our dylibs there? Would it be better to have them alongside our own bundle?&lt;BR /&gt;&lt;BR /&gt;I prefer to have an Add-on that is self-contained.&lt;/DIV&gt;</description>
    <pubDate>Thu, 13 Jul 2023 12:32:46 GMT</pubDate>
    <dc:creator>stefan</dc:creator>
    <dc:date>2023-07-13T12:32:46Z</dc:date>
    <item>
      <title>Proper way of including Dynamic Libraries</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241695#M4974</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;What is the proper way to install an add-on which uses Dynamic Libraries? (DLL on Windows, dylib on OSX).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Specifically on OSX: should they be embedded in the Bundle? Or placed in the same folder as the bundle? In the ArchiCAD Root or Support folder?&lt;BR /&gt;&lt;BR /&gt;e.g. I see for the Rhino add-in, that the "dylib" for OpenNURBS is installed in the ArchiCAD Support folder and that the library has an @rpath/ install name.&lt;BR /&gt;&lt;BR /&gt;Are we allowed to put our dylibs there? Would it be better to have them alongside our own bundle?&lt;BR /&gt;&lt;BR /&gt;I prefer to have an Add-on that is self-contained.&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Jul 2023 12:32:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241695#M4974</guid>
      <dc:creator>stefan</dc:creator>
      <dc:date>2023-07-13T12:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proper way of including Dynamic Libraries</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241696#M4975</link>
      <description>My AddOn is a Win only and uses DLLs.&lt;BR /&gt;
I dont know the best way.&lt;BR /&gt;
I use the following:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;Add-Ons
    MyAddonFolder
        addon_file.apx
        (subfolder)
            file1.dll
            file2.dll
&lt;/PRE&gt;

PS: &lt;BR /&gt;
Subfolder uses parentheses as archicad dont look inside.&lt;BR /&gt;
&lt;BR /&gt;
Addition:&lt;BR /&gt;
I use dynamic linking for DLLs ( LoadLibraryEx and GetProcAddress ).&lt;BR /&gt;
For static linking DLL place is more limited.</description>
      <pubDate>Wed, 09 Dec 2015 07:17:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241696#M4975</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2015-12-09T07:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proper way of including Dynamic Libraries</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241697#M4976</link>
      <description>&lt;BLOCKQUOTE&gt;stefan wrote:&lt;BR /&gt;What is the proper way to install an add-on which uses Dynamic Libraries? (DLL on Windows, dylib on OSX).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Specifically on OSX: should they be embedded in the Bundle? Or placed in the same folder as the bundle? In the ArchiCAD Root or Support folder?&lt;BR /&gt;
&lt;BR /&gt;
e.g. I see for the Rhino add-in, that the "dylib" for OpenNURBS is installed in the ArchiCAD Support folder and that the library has an @rpath/ install name.&lt;BR /&gt;
&lt;BR /&gt;
Are we allowed to put our dylibs there? Would it be better to have them alongside our own bundle?&lt;BR /&gt;
&lt;BR /&gt;
I prefer to have an Add-on that is self-contained.&lt;/BLOCKQUOTE&gt;

On OS X the preferred way is to put the dylib into the bundle, according to Apple's guidelines. You'll have to set up the root of the @rpath correctly, unless you wan to load the dylib manually via dlopen().&lt;BR /&gt;
&lt;BR /&gt;
Best, Ákos</description>
      <pubDate>Tue, 19 Jan 2016 09:36:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241697#M4976</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2016-01-19T09:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proper way of including Dynamic Libraries</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241698#M4977</link>
      <description>&lt;BLOCKQUOTE&gt;Akos wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;stefan wrote:&lt;BR /&gt;What is the proper way to install an add-on which uses Dynamic Libraries? (DLL on Windows, dylib on OSX).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Specifically on OSX: should they be embedded in the Bundle? Or placed in the same folder as the bundle? In the ArchiCAD Root or Support folder?&lt;BR /&gt;
&lt;BR /&gt;
e.g. I see for the Rhino add-in, that the "dylib" for OpenNURBS is installed in the ArchiCAD Support folder and that the library has an @rpath/ install name.&lt;BR /&gt;
&lt;BR /&gt;
Are we allowed to put our dylibs there? Would it be better to have them alongside our own bundle?&lt;BR /&gt;
&lt;BR /&gt;
I prefer to have an Add-on that is self-contained.&lt;/BLOCKQUOTE&gt;

On OS X the preferred way is to put the dylib into the bundle, according to Apple's guidelines. You'll have to set up the root of the @rpath correctly, unless you wan to load the dylib manually via dlopen().&lt;BR /&gt;
&lt;BR /&gt;
Best, Ákos&lt;/BLOCKQUOTE&gt;

Waht would be the best practice for windows?</description>
      <pubDate>Mon, 18 Dec 2017 15:08:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241698#M4977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-18T15:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proper way of including Dynamic Libraries</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241699#M4978</link>
      <description>&lt;BLOCKQUOTE&gt;mar_kq wrote:&lt;BR /&gt;
Waht would be the best practice for windows?&lt;/BLOCKQUOTE&gt;

Well, the default search path for DLLs on Windows is the application and the system directories. So if you want to be self contained then place the DLLs beside your add-on. In this case you have to load each DLL manually and get the function pointers' addresses to be able to call them (like Oleg suggested). The other way is to place your DLLs beside ARCHICAD — in this case your DLLs can be called the same way as you call the system DLLs, but we don't consider that very nice &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
Best, Ákos</description>
      <pubDate>Fri, 05 Jan 2018 13:06:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Proper-way-of-including-Dynamic-Libraries/m-p/241699#M4978</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2018-01-05T13:06:25Z</dc:date>
    </item>
  </channel>
</rss>

