dynamically linked drivers

Ulf Wiger etxuwig@REDACTED
Tue Jan 16 17:52:56 CET 2001

On Tue, 16 Jan 2001, Garry Hodgson wrote:

>reading the erlang book on ports and drivers last night, 
>it appears that i must hand-compile a version of erlang
>with my new driver linked in, after editing config.c to
>reference it.  is this still accurate?  it doesn't seem
>a very useful way to go, in an environment where i'd like
>to use erlang to control various other software.  should
>i abandon this method, and go with the other external
>port methods?

No, you don't have to recompile Erlang to link in a driver.
The documentation on drivers hasn't really kept up with current

Read the manual for the module erl_ddll for information on how to
dynamically link drivers into an Erlang system.

You might also want to read the ERTS User's Guide in the OTP R7B
manual. There is a chapter on the driver for distributed erlang,
and it talks a little about drivers in general.

Still, if you can do with a normal port, you can save yourself the
headache of debugging pointer errors in your own driver code.
If, for performance reasons, you need your own driver, you can start
with a normal port, and add your own driver later, with minimal
changes to the erlang code.

Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB

More information about the erlang-questions mailing list