English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Getting ocamlrun to load a C library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-01-10 (21:02)
From: David Fox <david.fox@l...>
Subject: [Caml-list] Getting ocamlrun to load a C library
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