igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Re: igraph-help Digest, Vol 26, Issue 22


From: Gábor Csárdi
Subject: Re: [igraph] Re: igraph-help Digest, Vol 26, Issue 22
Date: Fri, 26 Sep 2008 15:41:56 +0200

Well, you either need to set LD_LIBRARY_PATH to the directory that
contains the igraph library, or set  LD_PRELOAD to the igraph library
file itself.

IMHO the sites that suggest never to set these are wrong. I guess that
they consider this a security hazard, but really, it is not. Maybe it
would be if you do it for the 'root' user.

Another possibility would be not to change anything, but put the
igraph library to a standard place like /usr/local/lib, but then you
would need to root to do this.

It is perfectly fine to set LD_LIBRARY_PATH.

Gabor

On Fri, Sep 26, 2008 at 3:32 PM, Bhalchandra Thatte <address@hidden> wrote:
> Thanks. My compilation and linking problem is fixed now. I was giving
> the include path correctly, but the library path incorrectly.
> But now I have a new question. When I run the program, it does not see
> the shared library
>
> ./main: error while loading shared libraries: libigraph.so.0: cannot
> open shared object file: No such file or directory
>
> I guess I have to set some environment variable since I have installed
> the package in a non-standard location (/work/local/...) But some
> websites say you should never set LD_LIBRARY_PATH variable. Also, when
> I run "ldd main" (here my program name is main), I get
> "libigraph.so.0 => not found"
> which probably means it is not linked correctly.
>
> Thanks for your help.
> Bhalchandra Thatte
> --
> Work:
> Department of Statistics, 1 South Parks Road, University of Oxford,
> Oxford OX1 3TG, United Kingdom
> Phone: +44 (0)1865 285 366
>
>>
>> -l just means that you want to link against the igraph library. If you
>> want to compile programs using igraph, you need
>>
>> 1) -I<igraph-include-directory>
>> 2) -ligraph
>> 3) -L<igraph-library-directory>
>>
>> <igraph-include-directory> is the directory where the igraph.h file is.
>> <igraph-library-directory> is the directory where the libigraph.so
>> file is (assuming Linux, for other operating systems it has a
>> different name)
>>
>> If you want to compile and link in two separate steps, then use 1) for
>> compilation and both 2) and 3) for linking.
>>
>> Hope it helps,
>> Gabor
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>




reply via email to

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