[erlang-questions] Linking problems to libei.a

Jachym Holecek jachym.holecek@REDACTED
Mon Jun 23 09:37:46 CEST 2008


On Fri, 20 Jun 2008 21:25:51 +0200, public address <pub.address@REDACTED>  
wrote:
> the compile commands:
> # no problems here:
> gcc -Wall -ggdb  
> -I/home/steffen/usr/lib/erlang/lib/erl_interface-3.5.7/include -c ltest.c
> #linker problems:
> gcc -L/home/steffen/usr/lib/erlang/lib/erl_interface-3.5.7/lib -lei  
> -lerl_interface ltest.o -o ltest

The order of object files (including libraries) does matter, see '-l'
option in gcc manual for more details. This should work:

   $ gcc -L/home/steffen/usr/lib/erlang/lib/erl_interface-3.5.7/lib \
     -o ltest ltest.o -lei -lerl_interface

HTH,
	-- Jachym




More information about the erlang-questions mailing list