caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] native plugin ocaml-mysql
@ 2011-08-13  2:08 pierrchp
  2011-08-13  9:59 ` Stéphane Glondu
  0 siblings, 1 reply; 2+ messages in thread
From: pierrchp @ 2011-08-13  2:08 UTC (permalink / raw)
  To: caml-list



Hello,

I am trying to compile a plugin for ocaml-mysql, in order to use it with the
native version of the ocsigen webserver. I ran into the following problem:

ocamlopt -shared -linkall  -o mysql.cmxs mysql.cmxa

 usr/bin/ld: cannot find -lmysql_stubs
 collect2: ld returned 1 exit status
 File "caml_startup", line 1, characters 0-1:
 Error: Error during linking

I looked at how mysql.cmxa was compiled :

   ocamlopt -a -cclib -lmysql_stubs -cclib -lzocamlopt -o mysql.cmxa mysql.cmx

which does not raise any error, and tried :

    ocamlopt -shared -cclib -lmysql_stubs -cclib -lzocamlopt  -o mysql.cmxs
mysql.cmx

    with the same error.


Any idea on how to make that native plugin ?


Cheers

 -Pierre

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] native plugin ocaml-mysql
  2011-08-13  2:08 [Caml-list] native plugin ocaml-mysql pierrchp
@ 2011-08-13  9:59 ` Stéphane Glondu
  0 siblings, 0 replies; 2+ messages in thread
From: Stéphane Glondu @ 2011-08-13  9:59 UTC (permalink / raw)
  To: pierrchp; +Cc: caml-list

Le 13/08/2011 04:08, pierrchp@free.fr a écrit :
> ocamlopt -shared -linkall  -o mysql.cmxs mysql.cmxa
> 
>  usr/bin/ld: cannot find -lmysql_stubs
>  collect2: ld returned 1 exit status
>  File "caml_startup", line 1, characters 0-1:
>  Error: Error during linking

You must add -I /directory/where/libmysql_stubs.a/is


Cheers,

-- 
Stéphane



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-13  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-13  2:08 [Caml-list] native plugin ocaml-mysql pierrchp
2011-08-13  9:59 ` Stéphane Glondu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).