[Top][All Lists]

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

Re: [igraph] igraph 0.6 visual studio 2008 (vc9 sp1) bugfixes

From: Tamas Nepusz
Subject: Re: [igraph] igraph 0.6 visual studio 2008 (vc9 sp1) bugfixes
Date: Thu, 20 May 2010 10:12:05 +0100

Hi Laurence,

Thanks for your email, it's really helpful as we don't test igraph regularly on 

> (3)
> - Copy this file to the windows machine.
> - Also copy the 'include' dir from the igraph directory to your
> windows machine (shouldn't this be included in the zip!?)
Yes, it should -- I will fix our makefile so it gets included. Thanks for 
letting us know.

> (5.1) - igraph.vcproj
> First, we need to add the missing include dir.
I have also patched igraph.vcproj to include this dir as well.

> (5.2) - drl_graph.cpp (error C2668: 'sqrt' : ambiguous call to
> overloaded function)
> change line 1145:
>  float num_connections = sqrt(neighbors[node_ind].size());
> to
>  float num_connections = sqrt((double)neighbors[node_ind].size());

> (5.3) - community.c (error C2143: syntax error : missing ';' before
> 'type')
> Since this is a *.c file, visual studio treats the file differently
> than a *.cpp file. If it is a C file, you will need to put the
> variable declarations at the top of a function.

> (5.4) - community.c (error C2054: expected '(' to follow 'inline')
> 'inline' does not work in *.c files when using visual studio, so
> either change the extension to *.cpp or remove the 'inline' keyword.
I used a slightly different solution here:

#ifdef _MSC_VER
#  define INLINE __forceinline
#  define INLINE inline

INLINE igraph_real_t igraph_i_multilevel_community_modularity_gain(...)

> (5.5) - community.c (error C2143: syntax error : missing ';' before
> 'type')
> at line 2349, in function:
>  int igraph_i_community_multilevel_step(igraph_t *graph,
> igraph_vector_t *weights, igraph_vector_t *membership, igraph_real_t
> *modularity)
> put these declaration at the top

> (5.6) - cliques.c (error C2275: 'igraph_vector_t' : illegal use of
> this type as an expression)

> (7) Fixing igraphtest
> Add the missing include dir.

> (8) - Building..
> When trying to build you will end up with these errors:
> [...]
> The problem is that these functions are defined but not implemented?
> extern int igraph_dl_yyparse(void);
> extern FILE *igraph_dl_yyin;
> extern int igraph_i_dl_mode;
These functions are implemented in foreign-dl-lexer.c and foreign-dl-parser.c, 
which are in turn generated by bison from foreign-dl-lexer.l and 
foreign-dl-parser.y. The generation is done during the build phase, so if you 
simply check out igraph, run ./configure and then run make msvc, these files 
won't be generated and included in the ZIP. At least that's my first guess. So, 
in your step 1, I would actually run "make" before "make msvc". Note that you 
will need bison on your Ubuntu box. The final igraph release will include these 
generated files, so you won't have the same problems if you download the 
official released tarball for 0.6 (which we don't have yet as 0.6 is not 

Thanks once again for your help, it was really helpful!


reply via email to

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