From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id ECF57BBAF for ; Tue, 29 Jun 2010 08:19:05 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmICAG8tKUzRVaE2kGdsb2JhbACTAYwpCBUBAQEBCQkMBxEDH64xggmFWS6IUwEBAwUIhRcEg2I X-IronPort-AV: E=Sophos;i="4.53,502,1272837600"; d="scan'208";a="65525100" Received: from mail-fx0-f54.google.com ([209.85.161.54]) by mail4-smtp-sop.national.inria.fr with ESMTP; 29 Jun 2010 08:19:05 +0200 Received: by fxm13 with SMTP id 13so1855560fxm.27 for ; Mon, 28 Jun 2010 23:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=iTJoa3VMS730t/2/epni9Xs9MXCNIW6lQEnFWXd4o68=; b=ibDqBjhbMH9xR63dOjYFTisqMjOqABj+rp7gDWmergsjBRSQr8As3kpXqwwrxXdB0k ox2QPZ3Kmtm2LVT5Vf3R2RtcXpfY3iZIF8hpSJQ7/qjCCJlsW3KeA57EyG2ZzD37BIoC yhP6makH60l6+o/23+MGcRSfvtmE2wIBf17m8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=YC/mutlu8E0viWXiFFWotmgVp+UC+mMyr4JPWtJzsw63JRt1M5EZa/UJL71MeCPGn5 V1SC/0oMeVni6pGJ+gpV/xxSMR+nTyjJZRxuSua8r5itu9jRVBd6F6VwdUa62iAf1DQi gxHXZrs8+/lhuiU6wv7DEOTW6WdlvLxB9nGKM= Received: by 10.102.16.37 with SMTP id 37mr1585341mup.67.1277792345232; Mon, 28 Jun 2010 23:19:05 -0700 (PDT) Received: from debian ([79.114.65.123]) by mx.google.com with ESMTPS id y37sm5467754mug.59.2010.06.28.23.19.04 (version=SSLv3 cipher=RC4-MD5); Mon, 28 Jun 2010 23:19:05 -0700 (PDT) Date: Tue, 29 Jun 2010 09:19:00 +0300 From: =?UTF-8?B?VMO2csO2aw==?= Edwin To: caml-list@inria.fr Subject: Re: [Caml-list] Re: Linking with libstdc++.so Message-ID: <20100629091900.2b7a432c@debian> In-Reply-To: References: <1277759606.4c29107687612@http.citycable.ch> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 symlink:01 usr:01 lib:01 On Mon, 28 Jun 2010 17:50:48 -0400 Michael Ekstrand wrote: > 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). Yes that works because there is a libstdc++.so symlink, just not in /usr/lib: /usr/lib/gcc/x86_64-linux-gnu/4.4.4/libstdc++.so -> ../../../libstdc++.so.6 It is in a compiler-specific directory, so for your old compiler it'd probably symlink to libstdc++.so.5, and for the current compiler it'd symlink to libstdc++.so.6. Best regards, --Edwin