Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 <>
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/ undefined symbol: mysql_store_result.

The symbol mysql_store_result is in /usr/lib/, 
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 Archives:
Bug reports: FAQ:
Beginner's list: