<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/e1d274a133b68487086df9bb59b11307"
  from="Sandeep Subramaniam &lt;sandeeps@i...&gt;"
  author="Sandeep Subramaniam"
  date="2002-07-05T15:54:23"
  subject="[Caml-list] reg : camlidl_malloc"
  prev="2002/07/1b99bcd01eb69ed9996ff372f98a9f8f"
  next="2002/07/e4e76a2c52e44966440773a9035b784d"
  next-in-thread="2002/07/20a45415a16f4dc6a69803bdb47024ad"
  prev-thread="2002/07/1b99bcd01eb69ed9996ff372f98a9f8f"
  next-thread="2002/07/1eefe810f7f0f0aa410a2eab708b2234"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] reg : camlidl_malloc">
<msg 
  url="2002/07/e1d274a133b68487086df9bb59b11307"
  from="Sandeep Subramaniam &lt;sandeeps@i...&gt;"
  author="Sandeep Subramaniam"
  date="2002-07-05T15:54:23"
  subject="[Caml-list] reg : camlidl_malloc">
<msg 
  url="2002/07/20a45415a16f4dc6a69803bdb47024ad"
  from="Dmitry Bely &lt;dbely@m...&gt;"
  author="Dmitry Bely"
  date="2002-07-05T18:25:15"
  subject="Re: [Caml-list] reg : camlidl_malloc">
<msg 
  url="2002/07/f93829baba8851df89806c7d94af4860"
  from="Sandeep Subramaniam &lt;sandeeps@i...&gt;"
  author="Sandeep Subramaniam"
  date="2002-07-05T19:19:34"
  subject="Re: [Caml-list] reg : camlidl_malloc">
</msg>
</msg>
</msg>
</thread>

<contents>

Hi,

I am using camlidl-1.04 and ocaml-3.04 on Linux.

Following is a section of code generated by camlidl which invokes the 
function camlidl_malloc() declared in caml/camlruntime.h 

value camlidl_test1_write_mark_table(
	value _v_mark,
	value _v_num)
{
  struct marks *mark; /*in*/
  int num; /*in*/
  mlsize_t _c1;
  mlsize_t _c2;
  value _v3;
  struct camlidl_ctx_struct _ctxs = { CAMLIDL_TRANSIENT, NULL };
  camlidl_ctx _ctx = &amp;_ctxs;
  _c1 = Wosize_val(_v_mark);
  mark = camlidl_malloc(_c1 * sizeof(struct marks ), _ctx);
  for (_c2 = 0; _c2 &lt; _c1; _c2++) {
    _v3 = Field(_v_mark, _c2);
    camlidl_ml2c_test1_struct_marks(_v3, &amp;mark[_c2], _ctx);
  }
  num = Int_val(_v_num);
  write_mark_table(mark, num);
  camlidl_free(_ctx);
  return Val_unit;
}

The C file containing this code is compiled into a shared object (.so
file)

But when dynamically linking this C code with Caml code I get the error :

"Error on dynamically loaded library: ./test1_stubs.so: undefined symbol:
camlidl_malloc"

It seems that camlidl_malloc() is declared in camlidlruntime.h but not
defined .

So how do I solve this error ?

Thanx,
Sandeep.




Sandeep Subramaniam

Graduate Research Assistant
ITTC, Raymond Nichols Hall,
University of Kansas



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

