[erlang-questions] Problems with C Erlang interface

J Bhanot j.bhanot@REDACTED
Wed Jan 30 07:01:47 CET 2008


Hi, 

I created a C file test.c

{code}

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

main()
{
int i=2;
erl_init(NULL,0);
}

{/code}


Compiled it as follows : 
cc -c -I/usr/local/lib/erlang/lib/erl_interface-3.5.5.3/include test.c
No errors in compiling

Tried to link it as follows:
ld -L/usr/local/lib/erlang/lib/erl_interface-3.5.5.3/lib test.o 
-lerl_interface -lei -o test
but during liking, I got tons of errrs

Sample error :
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2008.01.30 11:29:02 
=~=~=~=~=~=~=~=~=~=~=~=
ld -L/usr/local/lib/erlang/lib/erl_interface-3.5.5.3/lib test.o 
-lerl_interface -lei -o test
ld: warning: cannot find entry symbol _start; defaulting to 080480a0
/usr/local/lib/erlang/lib/erl_interface-3.5.5.3/lib/liberl_interface.a(erl_eterm.o): 
In function `erl_print_term':
/home/j.bhanot/Download/H.248/otp_src_R12B-0/lib/erl_interface/src/legacy/erl_eterm.c:860: 
undefined reference to `__ctype_b_loc'
/home/j.bhanot/Download/H.248/otp_src_R12B-0/lib/erl_interface/src/legacy/erl_eterm.c:870: 
undefined reference to `_IO_putc'
/home/j.bhanot/Download/H.248/otp_src_R12B-0/lib/erl_interface/src/legacy/erl_eterm.c:873: 
undefined reference to `fputs'
/home/j.bhanot/Download/H.248/otp_src_R12B-0/lib/erl_interface/src/legacy/erl_eterm.c:876: 
undefined reference to `_IO_putc'
/home/j.bhanot/Download/H.248/otp_src_R12B-0/lib/erl_interface/src/legacy/erl_eterm.c:962: 
undefined reference to `fprintf'


Please find the attched complete error log:


Would appreciate any help

Thanks,
jb

____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080130/e78ebf24/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: error.txt
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080130/e78ebf24/attachment.txt>


More information about the erlang-questions mailing list