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
Linking with
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michael Ekstrand <michael@e...>
Subject: Re: Linking with
On 06/28/2010 05:13 PM, Guillaume Yziquel wrote:
> Hello.
> I've been trying to compile a library with C++. With something like:
> ocamlc -verbose -a -dllib -dllib libstdc++ -o myStuff..cma myStuff.cmo
> However, on Debian systems, there is a and a file. No 
> file. So the -dllib libstdc++ option doesn't locate properly the library. How do you 
> manage to have more control over the name of the library without resorting to using an ugly 
> symlink in /usr/lib/ocaml/stublibs?
> All the best,

I have been able to link against libstdc++ by using -lstdc++ (rather
than -dllib).  This is on an Ubuntu machine with the standard
development packages installed.  Also, I use ocamlmklib rather than
directly running ocamlc to build my cma file; I don't expect that this
makes a difference for this particular problem, but is something worth
considering (and IMO easier).

- Michael