Load and use C dynamic libraries OSX
3 posts
• Page 1 of 1
Load and use C dynamic libraries OSX
Hi,
Is where any way to load and use C dynamic libraries (.so/.dylib) in Dyalog OSX? Something like CFFI for Python etc.
Is where any way to load and use C dynamic libraries (.so/.dylib) in Dyalog OSX? Something like CFFI for Python etc.
- alexeyv
- Posts: 56
- Joined: Tue Nov 17, 2015 4:18 pm
Re: Load and use C dynamic libraries OSX
⎕NA is your friend here.
Currently the documentation is rather Windows-centric, but you may find taking a look at the function R.rscproxyUNIX.init will give you some clues, as well as the contents of http://help.dyalog.com/14.1/index_Left.htm#CSHID=UNIX_IUG%2FQuadNA.htm|StartTopic=Content%2FUNIX_IUG%2FQuadNA.htm
Since you will be running a shared library/DLL within the APL process, it is very easy to write over the workspace in memory, and it is very easy to mis-define the parameters to ⎕NA calls. In both cases a syserror is the likely outcome. From personal experience I strongly recommend that you save your code often, and set the environment variable ERRORONEXTERNALEXCEPTION=1 while you develop your code.
Currently the documentation is rather Windows-centric, but you may find taking a look at the function R.rscproxyUNIX.init will give you some clues, as well as the contents of http://help.dyalog.com/14.1/index_Left.htm#CSHID=UNIX_IUG%2FQuadNA.htm|StartTopic=Content%2FUNIX_IUG%2FQuadNA.htm
Since you will be running a shared library/DLL within the APL process, it is very easy to write over the workspace in memory, and it is very easy to mis-define the parameters to ⎕NA calls. In both cases a syserror is the likely outcome. From personal experience I strongly recommend that you save your code often, and set the environment variable ERRORONEXTERNALEXCEPTION=1 while you develop your code.
-
AndyS|Dyalog - Posts: 235
- Joined: Tue May 12, 2009 6:06 pm
Re: Load and use C dynamic libraries OSX
Thanks for pointers, I'll try it out.
- alexeyv
- Posts: 56
- Joined: Tue Nov 17, 2015 4:18 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group