From owner-freebsd-questions@FreeBSD.ORG Tue Mar 22 13:59:22 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08DC8106564A for ; Tue, 22 Mar 2011 13:59:22 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id BF46F8FC18 for ; Tue, 22 Mar 2011 13:59:21 +0000 (UTC) Received: by qyk35 with SMTP id 35so3470898qyk.13 for ; Tue, 22 Mar 2011 06:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=4dgfR/jwWjcTKNcKW9nRV2kpHklYxFt+4i5YaLh/NPs=; b=bz5boI3DmIU65zcW40cvefmpYeNBGaoj2icBvUUWlcAFM75iwj4DfmgHWGbMyVLtpe TYHBr2V93ZdCKWL/2f1t27ZUvIraimtTxJK9TTZJHPwRxfgh511mDZhsb5t1DFOZK3b/ yPHwTikGr4ZjfLSX6JJ6BP1+ch3XEw0DI/Wec= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=GWV5ovI0nrf3Hk0XLU5cXwCltbWe9jkVpvNv0VizSF1WhFbHUV3Nyoc9eKnr+x2TNg 4xZ/xxjfjRbhq6X+uQvjecpCXl2IzT9X25talG4rVBT3BrjJt9Gjd++3js63GWHUnl8z ARWHIMLHJuCMtL5JzogugU4B7H04HCUJM80t4= MIME-Version: 1.0 Received: by 10.224.213.8 with SMTP id gu8mr4328982qab.320.1300800482503; Tue, 22 Mar 2011 06:28:02 -0700 (PDT) Received: by 10.52.160.132 with HTTP; Tue, 22 Mar 2011 06:28:02 -0700 (PDT) Date: Tue, 22 Mar 2011 09:28:02 -0400 Message-ID: From: Jim To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: opening a shared object / failing with Undefined Symbol. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 13:59:22 -0000 I have an application that opens two .so files with dlopen(3): /usr/local/lib/libag_core.so /usr/local/lib/libag_gui.so Both files exist Running nm(1) against each produces a lot of output, showing all the symbols I know to exist in each library. My application gets a null return from dlopen on the libag_gui.so. dlerror produces the following string: "/usr/local/lib/libag_gui.so Undefined symbol "agTimingLock" $ nm /usr/local/lib/libag_gui.so | grep agTiming U agTimingLock I'm guessing that means that agTimingLock is used in that library but not defined? $ nm /usr/local/lib/libag_core.so | grep agTiming 0000000000141c00 B agTimingLock And this would mean that it is defined in libag_core.so? Given that libag_core.so gets loaded first, does anyone have any suggestions on how to fix such an issue? (Note: I didn't write this library, I did compile/install it) Thanks, -Jim Stapleton