From owner-freebsd-questions@FreeBSD.ORG Fri Jul 18 14:31:27 2008 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 F41B31065670 for ; Fri, 18 Jul 2008 14:31:26 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235]) by mx1.freebsd.org (Postfix) with ESMTP id 9F4378FC08 for ; Fri, 18 Jul 2008 14:31:26 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: by wr-out-0506.google.com with SMTP id c8so138572wra.27 for ; Fri, 18 Jul 2008 07:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=2E7fgJoP0mWT2MXlJozzsE0pVGIm6ubRkZiNvvseykU=; b=BCSbVhXiQL5QqKD9ykq7QvkeQSqhkXxCdzZz/yXFHH5Ha//YNZgzu/12PJyhj7habM EA6ZWS9ETD70/DVKLKUR7IejotsHgivqoe+OLq2K9+IT+82VLHENJ/agaRnwLgLUo4it JgwPBgOezA3dfYt8NK3U3BeVlTpbH/gqxC8Oc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=qj6HC+1WRxC9ZvDmTQDP80KXLoA8vF65rdQ6/FmiFAqW/f8dzNzSYcSqfijKHqqThd Tuh+UjgI8POWimkEH6KEh+tw0dMOHBBp5v9rJ+W1zpvbZQ/otuw97r3dwbuQLH4d+xfT QY9GQ0GAJYa956mYWa2v42+SRXudvHJyrQ0gA= Received: by 10.90.115.17 with SMTP id n17mr195619agc.57.1216391485281; Fri, 18 Jul 2008 07:31:25 -0700 (PDT) Received: by 10.90.33.17 with HTTP; Fri, 18 Jul 2008 07:31:25 -0700 (PDT) Message-ID: <80f4f2b20807180731i19108a46o1a07b33c8c90f2f3@mail.gmail.com> Date: Fri, 18 Jul 2008 10:31:25 -0400 From: Jim To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: freebsd library loading question 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: Fri, 18 Jul 2008 14:31:27 -0000 I'm hoping this is the right place to ask: I'm working on something in FreeBSD 7.0 (i386) and GCC: I'm getting the following error when executing a program: dlerror -> Invalid shared object handle 0x0 the full context is: DEBUG: ../include/ctypeless_dyn_unix.h(00310) ->Loading library: ctypeless.so Error loading ctypeless library: -1 dlerror -> Invalid shared object handle 0x0 which comes from the lines: int ret = 0; if(!dlname) dlname = "ctypeless.so"; CT_DEBUG1("Loading library: %s\n\n", dlname); void *dlhandle = dlopen(dlname, RTLD_NOW | RTLD_GLOBAL); if(dlerror()) { printf("Error loading ctypeless library: %d\n dlerror -> %s\n", test, dlerror()); return -1; } Am I correct in assuming this is because the program is not finding the library? I tried putting the ctypeless.so library in /usr/local/lib, but that did not fix the issue. Any suggestions on what I'm doing wrong (or a better place to ask)? Thanks, -Jim Stapleton