[erlang-questions] Linking problems to libei.a

public address pub.address@REDACTED
Fri Jun 20 21:25:51 CEST 2008


Hi all,
I'm trying to link a c program to the ei library.
This seems not to work, I get linking errors:
undefined reference to XXXXX.

Platform is linux, erlang is compiled from otp_src_R12B-3

the test program:

#include <ei.h>
#include <erl_interface.h>

int
main(int argc, char** argv) {
  ei_term et;
  char buf [255];
  int i = 0;
  ei_decode_ei_term(buf, &i, &et);
  return 0;
}

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
>>/home/steffen/hacking/erl_link_tst/ltest.c:9: undefined reference to `ei_decode_ei_term'<<

the content of  home/steffen/usr/lib/erlang/lib/erl_interface-3.5.7/lib:
 ls -l /home/steffen/usr/lib/erlang/lib/erl_interface-3.5.7/lib
total 1856
-rw-r--r-- 1 steffen steffen 724286 2008-06-19 02:15 libei.a
-rw-r--r-- 1 steffen steffen 714258 2008-06-19 02:15 libei_st.a
-rw-r--r-- 1 steffen steffen 220266 2008-06-19 02:15 liberl_interface.a
-rw-r--r-- 1 steffen steffen 219330 2008-06-19 02:15 liberl_interface_st.a

thanks in advance for helpful hints

greetings steffen

ps:
I hope yahoo does not send this in html "format"


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080620/e96103f6/attachment.htm>


More information about the erlang-questions mailing list