Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jul 2008 10:31:25 -0400
From:      Jim <stapleton.41@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   freebsd library loading question
Message-ID:  <80f4f2b20807180731i19108a46o1a07b33c8c90f2f3@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80f4f2b20807180731i19108a46o1a07b33c8c90f2f3>