I was following this documentation and I had problems making it work: http://www.erlang.org/doc/tutorial/c_portdriver.html the problem is: unix> gcc -o exampledrv -fpic -shared complex.c port_driver.c should be unix> gcc -o example_drv.so -fpic -shared complex.c port_driver.c that's all