[erlang-questions] Load driver with "driver_incorrect_version " error

devdoer bird devdoer2@REDACTED
Tue Sep 30 13:46:01 CEST 2008


HI:

I've written a driver with the entry below:

struct erl_drv_entry ttsl_driver_entry = {
    ttysl_init,
    ttysl_start,
    IF_IMPL(ttysl_stop),
    IF_IMPL(ttysl_from_erlang),
    IF_IMPL(ttysl_from_tty),
    NULL,
    "tty_sl20",
    NULL,
    NULL,
    IF_IMPL(ttysl_control),
   };

In fact ,the above code was stolen from erlang's emulator driver code, then
I compiled it in my linux  server with the gcc command "gcc -o ttsl_drv20.so
 -fpic -shared ttsl_drv20.c -I/usr/lib/erlang/erts-5.6.1/include/".

Everything is  ok except the error occurred while I try to load the driver
with erl_ddll .I 'm   blocked by  the error
"{error,driver_incorrect_version}".

So I check the erlang manual, it   says  the "extend_marker" field should
be  ERL_DRV_EXTENDED_MARKER or 0.

But my driver entry's extend_marker field  is indeed 0. Why does it still
throw the error?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080930/1aff3418/attachment.htm>


More information about the erlang-questions mailing list