Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] ocamlbuild linking with .so
@ 2012-11-08 13:27 Ivan Gotovchits
  0 siblings, 0 replies; only message in thread
From: Ivan Gotovchits @ 2012-11-08 13:27 UTC (permalink / raw)
  To: caml-list


Hello,

I need to link with a shared library placed in an arbitary path. Adding
the following to myocamlbuild.ml (in After_rules section) helps:

       flag ["ocaml"; "link"; "native"; "use_libpsp"] &
         (S[A"-I"; A stage_dir;
            A"-ccopt"; A("-Wl,-rpath,"^stage_dir^" -L"^stage_dir);
            A"-cclib"; A"-lpsp_stub";
            A"-linkall"])

But, for some unknown to me reason linker searches for library named
'libpsp_stub.so' (it seems ok to me...), but when I start program loader
searches for 'libdllpsp_stub.so' If I put both  files, linked together,
in the path 'stage_dir' then everything works... but. What's the reason to
have two different names? Or maybe I'm doing something wrong?

P.S. I'm talking only about ocamlopt.

P.S. ocaml 3.11

-- 
         (__) 
         (oo) 
   /------\/ 
  / |    ||   
 *  /\---/\ 
    ~~   ~~   
...."Have you mooed today?"...

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-08 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-08 13:27 [Caml-list] ocamlbuild linking with .so Ivan Gotovchits

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox