Adding non-erlang modules to releases

klacke <>
Sun Feb 27 15:44:21 CET 2005


On Sat, Feb 26, 2005 at 09:34:39PM -0600, Rich Neswold wrote:


> everything, but fails when my app calls erl_ddll:load_driver (because
> the .so file wasn't put in the proper spot -- and I don't know what
> the "proper spot" is, since the documentation gets a little sparse
> when it comes to including port drivers in a release.)


I typically put .so file in the priv dir of the application
Thus Makefile in 

myapp/c_src/Makefile

produce driver .so files and excetuables in ../priv

and the erlang code can do:

Driver = file_name:join([code:privdir(myapp), "driver.so"]),
erl_ddll:load_driver(Driver),
open_port({spawn, "driver},[])



/klacke



-- 
Claes Wikstrom                        -- Caps lock is nowhere and
http://www.hyber.org                  -- everything is under control          



More information about the erlang-questions mailing list