From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id B6583BBAF for ; Mon, 28 Jun 2010 23:51:04 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgsGAKq1KExQW+UMgWdsb2JhbACTA4wyFQEBFiIiwTCFJAQ X-IronPort-AV: E=Sophos;i="4.53,499,1272837600"; d="scan'208";a="54119081" Received: from lo.gmane.org ([80.91.229.12]) by mail2-smtp-roc.national.inria.fr with ESMTP; 28 Jun 2010 23:51:04 +0200 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OTMEE-00044K-W5 for caml-list@inria.fr; Mon, 28 Jun 2010 23:50:58 +0200 Received: from bas3-toronto02-1279545582.dsl.bell.ca ([76.68.80.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Jun 2010 23:50:58 +0200 Received: from michael by bas3-toronto02-1279545582.dsl.bell.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Jun 2010 23:50:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Michael Ekstrand Subject: Re: Linking with libstdc++.so Date: Mon, 28 Jun 2010 17:50:48 -0400 Message-ID: References: <1277759606.4c29107687612@http.citycable.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: bas3-toronto02-1279545582.dsl.bell.ca User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4 In-Reply-To: <1277759606.4c29107687612@http.citycable.ch> X-Enigmail-Version: 1.0.1 X-Spam: no; 0.00; guillaume:01 ocamlc:01 -verbose:01 -dllib:01 stubs:01 -dllib:01 cmo:01 symlink:01 usr:01 lib:01 ocaml:01 stublibs:01 ocamlmklib:01 ocamlc:01 ubuntu:98 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 dllmystuff_stubs.so -dllib libstdc++ -o myStuff..cma myStuff.cmo > > However, on Debian systems, there is a libstdc++.so.5 and a libstdc++.so.6 file. No > libstdc++.so 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