[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] error in example igraph_cliques.c
From: |
Gabor Csardi |
Subject: |
Re: [igraph] error in example igraph_cliques.c |
Date: |
Sun, 2 Dec 2007 11:06:24 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Vincent,
oh, so you're using g++, that explains it. You need explicit
convesion when assigning void pointers to non-void pointer variables.
Ie. instead of
v=igraph_vector_ptr_e(&result,i);
you need
v=(igraph_vector_t*)igraph_vector_ptr_e(&result,i);
Although igraph should work fine with C++, we only occasionaly check
that, and i can't remember ever checking compiling the example
programs with a c++ compiler. It might be worth to set up some
testing for this... thanks,
Gabor
On Sun, Dec 02, 2007 at 10:56:58AM +0100, Vincent Wolowski wrote:
> Hello Gabor,
[...]
>
> make all
> Building file: ../src/igraph-clique-proj.cpp
> Invoking: GCC C++ Compiler
> g++ -I/usr/local/include/igraph -O0 -g3 -Wall -c -fmessage-length=0
> -MMD -MP -MF"src/igraph-clique-proj.d" -MT"src/igraph-clique-proj.d"
> -o"src/igraph-clique-proj.o" "../src/igraph-clique-proj.cpp"
> ../src/igraph-clique-proj.cpp: In function 'int main()':
> ../src/igraph-clique-proj.cpp:48: warning: comparison between signed
> and unsigned integer expressions
> ../src/igraph-clique-proj.cpp:58: error: invalid conversion from
> 'void*' to 'igraph_vector_t*'
> make: *** [src/igraph-clique-proj.o] Error 1
[...]
--
Csardi Gabor <address@hidden> MTA RMKI, ELTE TTK