libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is this library not found?


From: Aljosha Papsch
Subject: Re: Why is this library not found?
Date: Sun, 1 May 2016 16:13:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.2

Hi,

unfortunately it doesn't work without the lib prefix either. I tried quite a few combinations:
libgneural
libgneural-0.0.0
gneural
gneural-0.0.0
gneural-0

From distant memory I recalled that ldconfig needs to be executed to avoid LD_LIBRARY_PATH. So I created a conf file for ldconfig at /etc/ld.so.conf.d/gneuralnetwork.conf (I'm on Parabola):
/opt/gneural/lib

But I'm out of luck. Do you have any other hints?

On 01.05.2016 16:05, Robert Boehne wrote:

The string you pass to Lt_dlopen should not contain the "lib" prefix.

On May 1, 2016 7:12 AM, "Aljosha Papsch" <address@hidden> wrote:
Hello,

I librarified gneural_network, patches pending at:
https://lists.gnu.org/archive/html/gneuralnetwork/2016-04/msg00015.html
In that patch library is called libgneural_network, locally I modified name to libgneural.

Next I installed gneural_network at /opt:

/opt/gneural/
├── bin
│   └── gneural_network
├── include
│   └── gneural
│       ├── activation.h
│       ├── binom.h
│       ├── defines.h
│       ├── error.h
│       ├── fact.h
│       ├── feedforward.h
│       ├── genetic_algorithm.h
│       ├── gradient_descent.h
│       ├── includes.h
│       ├── load.h
│       ├── msmco.h
│       ├── parser.h
│       ├── randomize.h
│       ├── random_search.h
│       ├── rnd.h
│       ├── save.h
│       ├── simulated_annealing.h
│       └── structures.h
└── lib
    ├── libgneural.a
    ├── libgneural.la
    ├── libgneural.so -> libgneural.so.0.0.0
    ├── libgneural.so.0 -> libgneural.so.0.0.0
    └── libgneural.so.0.0.0

I try to load that library with lt_dlopen:

#include <ltdl.h>
#include <stdio.h>

int
main (int argc, char** argv)
{
  lt_dlhandle handle;
  lt_dlinit ();
  handle = lt_dlopen ("libgneural");
  if (handle != NULL)
    {
      printf ("Loaded library\n");
      lt_dlclose (handle);
    }
  else
    {
      printf (lt_dlerror ());
      printf ("\n");
    }
  return 0;
}

This program fails with error message: file not found. What am I doing wrong? The command line is:
$ gcc -l ltdl -o dlopen dlopen.c
$ LD_LIBRARY_PATH=/opt/gneural/lib ./dlopen

Best regards
Aljosha Papsch

_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool


reply via email to

[Prev in Thread] Current Thread [Next in Thread]