igraph-help
[Top][All Lists]
Advanced

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

[igraph] gcc (OK) vs. g++ (failure)?


From: Francois Bastardie
Subject: [igraph] gcc (OK) vs. g++ (failure)?
Date: Thu, 24 Feb 2011 08:57:32 +0100

Hello,

 

I would like to know whether there is any means to make the below piece of code (igraph_get_shortest_paths_dijkstra.c, which is providen in the \example\simple together with igraph) work for c++?

As you may see from the messages below, the code compile and run correctly using icc (or gcc) but fails to do with icpc (or g++). It seems the c++ compiler is actually more demanding and then do not deal correctly with your definition/use of the VECTOR facilities.

Regards, Francois

 

address@hidden:~/igraph_under_linux/examples/simple$ g++ --version

g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3

 

address@hidden:~/igraph_under_linux/examples/simple$ icc igraph_get_shortest_paths_dijkstra.c -I/usr/local/include/igraph -L/usr/local/lib -ligraph -o shortest_path

 

address@hidden:~/igraph_under_linux/examples/simple$ ./shortest_path

 0 1

 0 1 2 3

 0 1 2 3 4 5

 0 1 2

 0 1

 0 1

 0 1 2 3

 0 9 8 7 6 5

 0 1 2

 0 1

 0 1

 0 3

 0 1 5

 0 1 2

 0 1

address@hidden:~/igraph_under_linux/examples/simple$ icpc igraph_get_shortest_paths_dijkstra.c -I/usr/local/include/igraph -L/usr/local/lib -ligraph -o shortest_path

igraph_get_shortest_paths_dijkstra.c(34): warning #1011: missing return statement at end of non-void function "print_vector"

  }

  ^

 

igraph_get_shortest_paths_dijkstra.c(53): error: argument of type "void *" is incompatible with parameter of type "igraph_vector_t *"

      igraph_vector_init(VECTOR(vecs)[i], 0);

                         ^

 

igraph_get_shortest_paths_dijkstra.c(60): error: argument of type "void *" is incompatible with parameter of type "igraph_vector_t *"

      print_vector(VECTOR(vecs)[i]);

                   ^

 

igraph_get_shortest_paths_dijkstra.c(68): error: argument of type "void *" is incompatible with parameter of type "igraph_vector_t *"

      print_vector(VECTOR(vecs)[i]);

                   ^

 

igraph_get_shortest_paths_dijkstra.c(87): error: argument of type "void *" is incompatible with parameter of type "igraph_vector_t *"

      print_vector(VECTOR(vecs)[i]);

                   ^

 

igraph_get_shortest_paths_dijkstra.c(88): error: argument of type "void *" is incompatible with parameter of type "igraph_vector_t *"

      igraph_vector_destroy(VECTOR(vecs)[i]);

                            ^

 

compilation aborted for igraph_get_shortest_paths_dijkstra.c (code 2)

 


reply via email to

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