willemdj / erlsom

XML parser for Erlang
GNU Lesser General Public License v3.0
265 stars 103 forks source link

Undefined function erlsom #74

Closed yuvalfro closed 4 years ago

yuvalfro commented 4 years ago

Hi,

I'm working on ubuntu. I clone the repo, and use the command "rebar compile" and it showed me this: ==> erlsom (compile) After that, I moved all the .beam files to 'ebin' directory. But when I try to run the continuation_example i get this error: ** exception error: undefined function erlsom:parse_sax/4 in function continuation_example:run/0 (continuation_example.erl, line 41)

The only thing I did different, is that these files are not in 'ROOT/lib/erlsom-1.2.1/src', but when I checked it I saw that I don't have an erlsom directory in this ROOT. Do I need to install something In order to have erlsome-1.2.1 directory? (When I tried to clone the repo into erlang/lib I got 'Permission denied' message).

I'm using ubuntu 20.04 and erlamg OTP 22.

Thanks!

willemdj commented 4 years ago

You have to make sure that the .beam files are in a folder that is in your code path. You can use code:add_path("path_to_your_ebin_directory")..

But a better idea is probably to use rebar3, create a project for whatever it is that you are doing, and include erlsom as a dependency.