Proper way of including Dynamic Libraries
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2015-12-08
09:27 PM
- last edited on
2023-07-13
02:32 PM
by
Doreena Deng
2015-12-08
09:27 PM
What is the proper way to install an add-on which uses Dynamic Libraries? (DLL on Windows, dylib on OSX).
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?
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.
Are we allowed to put our dylibs there? Would it be better to have them alongside our own bundle?
I prefer to have an Add-on that is self-contained.
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?
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.
Are we allowed to put our dylibs there? Would it be better to have them alongside our own bundle?
I prefer to have an Add-on that is self-contained.
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad28/Revit2024/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book
Archicad28/Revit2024/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book
Labels:
- Labels:
-
Add-On (C++)
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2015-12-09 08:17 AM
2015-12-09
08:17 AM
My AddOn is a Win only and uses DLLs.
I dont know the best way.
I use the following:
Subfolder uses parentheses as archicad dont look inside.
Addition:
I use dynamic linking for DLLs ( LoadLibraryEx and GetProcAddress ).
For static linking DLL place is more limited.
I dont know the best way.
I use the following:
Add-Ons MyAddonFolder addon_file.apx (subfolder) file1.dll file2.dllPS:
Subfolder uses parentheses as archicad dont look inside.
Addition:
I use dynamic linking for DLLs ( LoadLibraryEx and GetProcAddress ).
For static linking DLL place is more limited.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-01-19 10:36 AM
2016-01-19
10:36 AM
stefan wrote: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().
What is the proper way to install an add-on which uses Dynamic Libraries? (DLL on Windows, dylib on OSX).
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?
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.
Are we allowed to put our dylibs there? Would it be better to have them alongside our own bundle?
I prefer to have an Add-on that is self-contained.
Best, Ákos
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-12-18 04:08 PM
2017-12-18
04:08 PM
Akos wrote:Waht would be the best practice for windows?stefan wrote: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().
What is the proper way to install an add-on which uses Dynamic Libraries? (DLL on Windows, dylib on OSX).
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?
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.
Are we allowed to put our dylibs there? Would it be better to have them alongside our own bundle?
I prefer to have an Add-on that is self-contained.
Best, Ákos
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-01-05 02:06 PM
2018-01-05
02:06 PM
mar_kq wrote: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
Waht would be the best practice for windows?

Best, Ákos