Re: Why is this library not found?

Robert Boehne <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <CAADOFPGL+Pr1gg3Y-LiGkG-wB_kstr7CUMg9oFb22qgAN+=Mgw@mail.gmail.com>
Run it under gdb and see why it doesn't find the library.
On May 1, 2016 9:13 AM, "Aljosha Papsch" <[email protected]> wrote:

> 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" <[email protected]> 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
>>
>
>

_______________________________________________
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.