igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Installation problems with 0.3.2


From: Gabor Csardi
Subject: Re: [igraph] Installation problems with 0.3.2
Date: Wed, 31 Jan 2007 15:14:22 +0100
User-agent: Mutt/1.5.12-2006-07-14

Ulrik,

I'm not very familiar with cygwin, but i (hopefully) found a solution.
There are two problems, the first is that it seems that the cygwin 
gcc is very sensitive to the order of the arguments, so try giving the
name of the source file first. It sounds silly but works for me.

gcc test.c -I /home/csardi/software/include/igraph -L /home/csardi/software/lib 
-ligraph -o test

The second thing is that 'make install' fails to install the file 
cygigraph-0.dll, so you need to copy it to the library directory:

cp src/.libs/cygigraph-0.dll /home/csardi/software/lib

The third thing is not the Spanish inquisition but you also need to
set up the PATH (!) variable to include /home/csardi/software/lib
(=/usr/local/lib in your case). And voila:

$ ./test
Diameter of a random graph with average degree 5: 10.000000

Tell me if you have more problems. Will try to solve this problems in
the next release.

Gabor

On Tue, Jan 30, 2007 at 04:28:33PM -0500, Vincent Matossian wrote:
> 
>  Hi Ulrik, I run in cygwin as well. Have you tried  linking against
> cygigraph-0.dll ?
> 
> cheers,
> 
> vincent
> 
> 
> On 1/30/07, Ulrik Sj lin < address@hidden> wrote:
> 
>     Hello there,
> 
>     I am trying to install IGraph 0.3.2 on Cygwin (latest version). Running ./
>     configure; make; make install works
>     fine and everything looks nicely installed in /usr/local/lib and 
> /usr/local
>     /include/igraph.
> 
>     The problems start when I try to build an application that uses the lib,
>     specifically its the linking that does not
>     work. Compiling the following program:
> 
>     #include <igraph.h>
>     int main(void)
>     {
>     igraph_real_t diameter;
>     igraph_t graph;
>     igraph_erdos_renyi_game(&graph, IGRAPH_ERDOS_RENYI_GNP, 1000, 5.0/
>     1000,IGRAPH_UNDIRECTED,IGRAPH_NO_LOOPS);
>     igraph_diameter(&graph, &diameter, 0, 0, 0, IGRAPH_UNDIRECTED, 1);
>     printf("Diameter of a random graph with average degree 5: %f\n", (double)
>     diameter);
>     igraph_destroy(&graph);
>     return 0;
>     }
> 
>     I compile the program:
>     $ gcc -I/usr/local/include/igraph -L/usr/local/lib -ligraph igraph_test.c
>     igraph_test.c:13:2: warning: no newline at end of file
>     /cygdrive/c/DOCUME~1/Ulrik/LOCALS~1/Temp/cc8Hzl0x.o:igraph_test.c:
>     (.text+0x60):
>     undefined reference to `_igraph_erdos_renyi_game'
>     /cygdrive/c/DOCUME~1/Ulrik/LOCALS~1/Temp/cc8Hzl0x.o:igraph_test.c:
>     (.text+0x9a):
>     undefined reference to `_igraph_diameter'
>     /cygdrive/c/DOCUME~1/Ulrik/LOCALS~1/Temp/cc8Hzl0x.o:igraph_test.c:
>     (.text+0xb8):
>     undefined reference to `_igraph_destroy'
>     collect2: ld returned 1 exit status
> 
>     examining the lib file with objdump shows that the functions are there, 
> but
>     the linker does not
>     recognize it for some reason. I am running out ideas and would really
>     appreciate help.
>     Does anyone have any idea what the problem could be?
> 
>     Best Regards,
> 
>     Ulrik Sj lin
> 
>     _______________________________________________
>     igraph-help mailing list
>     address@hidden
>     http://lists.nongnu.org/mailman/listinfo/igraph-help
> 
> 
> 
> 

> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help


-- 
Csardi Gabor <address@hidden>    MTA RMKI, ELTE TTK




reply via email to

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