Why is this library not found?

Aljosha Papsch <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.