Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C4DFE431FD0 for ; Tue, 21 Jun 2011 19:57:45 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DqLXm9PPwJgu for ; Tue, 21 Jun 2011 19:57:45 -0700 (PDT) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D2B95431FB6 for ; Tue, 21 Jun 2011 19:57:44 -0700 (PDT) Received: from zancas.localnet (fctnnbsc30w-142167176081.pppoe-dynamic.High-Speed.nb.bellaliant.net [142.167.176.81]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p5M2vgxn014083 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Tue, 21 Jun 2011 23:57:43 -0300 Received: from bremner by zancas.localnet with local (Exim 4.76) (envelope-from ) id 1QZDdO-0007I5-1J; Tue, 21 Jun 2011 23:57:42 -0300 From: David Bremner To: Daniel Kahn Gillmor , notmuch@notmuchmail.org Subject: Re: hiding xapian symbols In-Reply-To: <4E014DDB.20001@fifthhorseman.net> References: <1308704923-14748-1-git-send-email-david@tethera.net> <4E014DDB.20001@fifthhorseman.net> User-Agent: Notmuch/0.6~238 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Tue, 21 Jun 2011 23:57:42 -0300 Message-ID: <87tybir2s9.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2011 02:57:45 -0000 On Tue, 21 Jun 2011 22:05:15 -0400, Daniel Kahn Gillmor wrote: > However, i'm concerned that the act of hiding these symbols will make it > so that any program that tries to link both libnotmuch and libxapian > will be unable to use these symbols. > > This makes me think that a program that links against libnotmuch and > libxapian, but actually tries to *use* libxapian's exception handling > may have a problem. > This seems to work, when compiled "g++ foo.c -lnotmuch -lxapian" I get ,---- | Error opening database at /nonexistant/.notmuch: No such file or directory | caught Cannot create directory `/nonexistant' `---- don't run it as root ;) #include #include #include main (int argc, char **argv){ notmuch_database_t *notmuch = notmuch_database_open ("/nonexistant", NOTMUCH_DATABASE_MODE_READ_ONLY); try{ (void)new Xapian::WritableDatabase ("/nonexistant", Xapian::DB_CREATE_OR_OPEN); } catch (const Xapian::Error &error) { printf("caught %s\n",error.get_msg().c_str()); } }