Erlang Driver Errors: undefined symbol : main

Just as a passing through note for people that read the thread but not motivated enough to click the links (I relate ^.^), these arguments for gcc mean:

  • -shared: Make a dynamically linkable library
  • -fpic: Generate the code so it is position independent (which you need to do as erlang is also PIC for security reasons, plus any shared library should be compiled as such except in very special situations as they won’t know where they get mapped in).
4 Likes

@starbelly Thank you, but this is directly related to Erlang because you can’t write efficient driver if you don’t have a deep understood of how that works, additionally it’s erl_interface that will implements these functions, in other terms Erlang is powered by C and every Erlanger should have knowledge about these things so I think this post will help many Erlangers since there is a very limitted questions about that, so thank you again and if you can show me a link to a detailed explanation about the dynamic symbol table of shared objects and how it works

1 Like