igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Cygwin -> Windows compilation - again.


From: Mark McClure
Subject: Re: [igraph] Cygwin -> Windows compilation - again.
Date: Mon, 09 Mar 2009 21:57:40 -0400

I've made some progress towards compiling my simple program
for Windows but it's still not quite there.  After searching
the mailing list archives (which appeared to be unavailable
earlier today), I tried moving around the order of the
command line arguments.  Amazingly it worked; the program
compiles and runs fine from Cygwin.  The problem is that I
still can't get it to run in Windows without Cygwin.  I've
tried compiling with and without the -mno-cygwin flag and
the program doesn't run in Windows either way.  I ran
Dependency Walker on the program and found that the program
needs CYGIGRAPH-0.DLL with or without the -mno-cygwin flag.
Without the -mno-cygwin flag, it also needs CYGWIN1.DLL.

I've included my previous message below.
Thanks again,
Mark


----- Original Message -----
From: Mark McClure <address@hidden>
Date: Monday, March 9, 2009 4:30 pm
Subject: [igraph] Cygwin -> Windows compilation - again.
To: address@hidden

> I've been experimenting with igraph for a few weeks on my
> Macintosh and it's been working great.  The application that
> I'm working towards will need to run on Windows, as well as
> Macintosh, so I've installed Cygwin on a Windows machine
> across the hall to experiment.  I've been able to compile
> some simple programs on Cygwin that work fine on Windows but
> I've yet to get the simplest igraph programs to compile.  I
> have built the igraph library and it seems to have installed
> fine into /usr/local/include/igraph and /usr/local/lib, but
> I get undefined reference errors when trying to compile a
> program.
>
> I've included the command line compilation errors and the
> program below.  Note that the program comes from the igraph
> tutorial here:
> http://cneurocvs.rmki.kfki.hu/igraph/doc/html/ch03s01.html
>
> Thanks for any assistance,
> Mark McClure
>
>
> ------- Compilation errors ---------------
> $ gcc -mno-cygwin -I/usr/local/include/igraph -L/usr/local/lib -
> ligraph -o first_igraph first_igraph.c
> /cygdrive/c/DOCUME~1/STUDEN~1.RBH/LOCALS~1/Temp/ccfgahVf.o:first_igraph.c:(.text+0x60): undefined reference to `_igraph_erdos_renyi_game'
> /cygdrive/c/DOCUME~1/STUDEN~1.RBH/LOCALS~1/Temp/ccfgahVf.o:first_igraph.c:(.text+0x9a): undefined reference to `_igraph_diameter'
> /cygdrive/c/DOCUME~1/STUDEN~1.RBH/LOCALS~1/Temp/ccfgahVf.o:first_igraph.c:(.text+0xb8): undefined reference to `_igraph_destroy'
> collect2: ld returned 1 exit status
> -------------------------------------------
>
>
> --- The program from the igraph tutorial --
> #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;
> }
>
>
>
reply via email to

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