[erlang-questions] erl_interface question

Paul Oliver <>
Fri Sep 7 10:39:53 CEST 2007


Hmm, seems to have changed between R10B-10 and the current release:

:/tmp$ diff
./otp_src_R10B-10/lib/erl_interface/include/ei.h /usr/include/ei.h
139,143d138
< /* MS C uses __declspec() to do its magic */
< #if !defined(__WIN32__)
< # define __declspec(foo) /* nothing */
< #endif
<
162,167d156
< /* 'erl_errno' as a variable. */
< extern __declspec(thread) volatile int __erl_errno;
<
< /* FIXME merge with erl_init defines below and maybe not use function
<    if not threaded */
<
172d160
< /* FIXME need to be volatile? */
:/tmp$



On 9/6/07, Paul Oliver <> wrote:
> Hi,
>
> I'm trying to link erl_interface code with non-threaded libs and get the
> following:
>
> :~/foo$ make
> gcc -fPIC -O2 -fomit-frame-pointer -Wall -g -Wno-pointer-sign -I.
> -I/opt/informix/incl/esql -I/tmp/appserv/incl -c arse.c -o ix86/arse.o
> arse.c: In function 'main':
> arse.c:33: warning: 'e' is used uninitialized in this function
> gcc -L/opt/informix/lib -L/opt/informix/lib/esql
> -L/usr/lib/erlang/lib/erl_interface- 3.5.5.3/lib
> -L/tmp/appserv/lib/ix86 ix86/arse.o -lerl_interface_st -lei_st -lOT_InfTcl
> -lc -o arse
> /usr/lib/erlang/lib/erl_interface-3.5.5.3/lib/liberl_interface_st.a(erl_eterm.o)
> : In function `erl_copy_term':
> (.text+0xfba): undefined reference to `__erl_errno'
> /usr/lib/erlang/lib/erl_interface-3.5.5.3/lib/liberl_interface_st.a(erl_eterm.o)
> : In function `erl_mk_var':
> (.text+0x12b8): undefined reference to `__erl_errno'
> /usr/lib/erlang/lib/erl_interface-3.5.5.3/lib/liberl_interface_st.a(erl_eterm.o)
> : In function `__erl_mk_reference':
> (.text+0x1362): undefined reference to `__erl_errno'
> /usr/lib/erlang/lib/erl_interface-3.5.5.3/lib/liberl_interface_st.a(erl_eterm.o)
> : In function `erl_mk_atom':
> (.text+0x1481): undefined reference to `__erl_errno'
> /usr/lib/erlang/lib/erl_interface-3.5.5.3/lib/liberl_interface_st.a(erl_eterm.o)
> : In function `erl_mk_port':
> (.text+0x1699): undefined reference to `__erl_errno'
> /usr/lib/erlang/lib/erl_interface-3.5.5.3/lib/liberl_interface_st.a(erl_eterm.o):(.text+0x175b)
> : more undefined references to `__erl_errno' follow
> collect2: ld returned 1 exit status
> make: *** [arse] Error 1
>
> I've seen this post.  Can anyone tell me what I'm doing wrong?
>
> Thanks in advance,
> Paul.
>
>


-- 
http://mosangeles.net



More information about the erlang-questions mailing list