<?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="2003/01/5c5d8ca29ec6a960f9735772bd364443"
  from="David Fox &lt;david.fox@l...&gt;"
  author="David Fox"
  date="2003-01-10T21:02:46"
  subject="[Caml-list] Getting ocamlrun to load a C library"
  prev="2003/01/1889606e7800e49e46e01c0a3d7cecd9"
  next="2003/01/abff6aa395818df18298e4883094b59c"
  prev-thread="2003/01/1889606e7800e49e46e01c0a3d7cecd9"
  next-thread="2003/01/abff6aa395818df18298e4883094b59c"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Getting ocamlrun to load a C library">
<msg 
  url="2003/01/5c5d8ca29ec6a960f9735772bd364443"
  from="David Fox &lt;david.fox@l...&gt;"
  author="David Fox"
  date="2003-01-10T21:02:46"
  subject="[Caml-list] Getting ocamlrun to load a C library">
</msg>
</thread>

<contents>
If I build the ocaml-mysql package I can compile and link programs with 
it just fine.  However, when I try to load it from a script like this:

#!/usr/bin/ocamlrun /usr/bin/ocaml
#load "ocmysql.cma"

I get

Cannot load required shared library: 
/usr/lib/ocaml/stublibs/dllocmysql.so: undefined symbol: mysql_store_result.

The symbol mysql_store_result is in /usr/lib/libmysqlclient.so.10.0.0, 
which is available when you link with ocmysql.cma because of the -cclib 
-lmysqlclient flags, but I don't know how to make it available in a 
script.  Is it possible?  What am I missing?
-------------------
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>

