Permalink
Browse files

DLL Imports/Exports and fixes for Visual Studio Builds (#958)

* Fix linker errors and add declspec dll exports to several functions

* Added igraph_decls header and additional DECLDIR declarations

* renamed files and removed stdint.h include in prpack_solver

* reusing stdint include from bignum.h in prpack_csc.h

* Added igraph_decls.h to public headers in Makefile.am and tweaked include of stdint in prpack_csc.h
  • Loading branch information...
1 parent 2cc4e36 commit ac88d125017ced5d77bd64e4a336fdd8e6a5ca84 @abeham abeham committed with ntamas Aug 14, 2016
Showing with 2,188 additions and 2,707 deletions.
  1. +59 −68 include/igraph_adjlist.h
  2. +15 −23 include/igraph_arpack.h
  3. +1 −9 include/igraph_array.h
  4. +90 −100 include/igraph_attributes.h
  5. +55 −64 include/igraph_bipartite.h
  6. +8 −17 include/igraph_blas.h
  7. +134 −143 include/igraph_centrality.h
  8. +44 −53 include/igraph_cliques.h
  9. +22 −31 include/igraph_cocitation.h
  10. +131 −140 include/igraph_community.h
  11. +62 −71 include/igraph_complex.h
  12. +18 −27 include/igraph_components.h
  13. +1 −10 include/igraph_constants.h
  14. +34 −43 include/igraph_constructors.h
  15. +17 −26 include/igraph_conversion.h
  16. +1 −10 include/igraph_datatype.h
  17. +24 −0 include/igraph_decls.h
  18. +1 −10 include/igraph_dqueue.h
  19. +12 −12 include/igraph_dqueue_pmt.h
  20. +39 −47 include/igraph_eigen.h
  21. +23 −32 include/igraph_embedding.h
  22. +6 −15 include/igraph_epidemics.h
  23. +18 −28 include/igraph_error.h
  24. +100 −109 include/igraph_flow.h
  25. +41 −50 include/igraph_foreign.h
  26. +180 −189 include/igraph_games.h
  27. +26 −35 include/igraph_graphlets.h
  28. +1 −9 include/igraph_heap.h
  29. +9 −9 include/igraph_heap_pmt.h
  30. +41 −50 include/igraph_hrg.h
  31. +41 −50 include/igraph_interface.h
  32. +3 −13 include/igraph_interrupt.h
  33. +68 −77 include/igraph_iterators.h
  34. +36 −45 include/igraph_lapack.h
  35. +118 −127 include/igraph_layout.h
  36. +16 −25 include/igraph_matching.h
  37. +1 −10 include/igraph_matrix.h
  38. +61 −61 include/igraph_matrix_pmt.h
  39. +3 −12 include/igraph_memory.h
  40. +24 −33 include/igraph_microscopic_update.h
  41. +13 −22 include/igraph_mixing.h
  42. +28 −37 include/igraph_motifs.h
  43. +11 −19 include/igraph_neighborhood.h
  44. +18 −27 include/igraph_nongraph.h
  45. +22 −31 include/igraph_operators.h
  46. +92 −101 include/igraph_paths.h
  47. +6 −16 include/igraph_progress.h
  48. +11 −19 include/igraph_psumtree.h
  49. +5 −13 include/igraph_qsort.h
  50. +30 −38 include/igraph_random.h
  51. +26 −35 include/igraph_scan.h
  52. +11 −20 include/igraph_separators.h
  53. +41 −50 include/igraph_spmatrix.h
  54. +1 −10 include/igraph_stack.h
  55. +11 −11 include/igraph_stack_pmt.h
  56. +4 −13 include/igraph_statusbar.h
  57. +84 −93 include/igraph_structural.h
  58. +31 −40 include/igraph_strvector.h
  59. +1 −9 include/igraph_threading.h.in
  60. +26 −35 include/igraph_topology.h
  61. +8 −17 include/igraph_transitivity.h
  62. +12 −20 include/igraph_types.h
  63. +5 −14 include/igraph_vector.h
  64. +68 −68 include/igraph_vector_pmt.h
  65. +26 −35 include/igraph_vector_ptr.h
  66. +1 −9 include/igraph_version.h.in
  67. +1 −10 include/igraph_visitor.h
  68. +4 −4 msvc/igraph.vcproj
  69. +1 −1 src/CHOLMOD/Include/cholmod_blas.h
  70. +4 −4 src/Makefile.am
  71. 0 src/bliss/{heap.cc → bliss_heap.cc}
  72. 0 src/cliquer/{graph.c → cliquer_graph.c}
  73. +2 −2 src/prpack/prpack_csc.h
  74. +0 −1 src/prpack/prpack_solver.cpp
@@ -24,16 +24,7 @@
#ifndef IGRAPH_ADJLIST_H
#define IGRAPH_ADJLIST_H
-#undef __BEGIN_DECLS
-#undef __END_DECLS
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
-#endif
-
+#include "igraph_decls.h"
#include "igraph_constants.h"
#include "igraph_types.h"
#include "igraph_datatype.h"
@@ -45,24 +36,24 @@ typedef struct igraph_adjlist_t {
igraph_vector_int_t *adjs;
} igraph_adjlist_t;
-int igraph_adjlist_init(const igraph_t *graph, igraph_adjlist_t *al,
- igraph_neimode_t mode);
-int igraph_adjlist_init_empty(igraph_adjlist_t *al, igraph_integer_t no_of_nodes);
-igraph_integer_t igraph_adjlist_size(const igraph_adjlist_t *al);
-int igraph_adjlist_init_complementer(const igraph_t *graph,
- igraph_adjlist_t *al,
- igraph_neimode_t mode,
- igraph_bool_t loops);
-void igraph_adjlist_destroy(igraph_adjlist_t *al);
-void igraph_adjlist_clear(igraph_adjlist_t *al);
-void igraph_adjlist_sort(igraph_adjlist_t *al);
-int igraph_adjlist_simplify(igraph_adjlist_t *al);
-int igraph_adjlist_remove_duplicate(const igraph_t *graph,
- igraph_adjlist_t *al);
-int igraph_adjlist_print(const igraph_adjlist_t *al);
-int igraph_adjlist_fprint(const igraph_adjlist_t *al, FILE *outfile);
-igraph_bool_t igraph_adjlist_has_edge(igraph_adjlist_t* al, igraph_integer_t from, igraph_integer_t to, igraph_bool_t directed);
-int igraph_adjlist_replace_edge(igraph_adjlist_t* al, igraph_integer_t from, igraph_integer_t oldto, igraph_integer_t newto, igraph_bool_t directed);
+DECLDIR int igraph_adjlist_init(const igraph_t *graph, igraph_adjlist_t *al,
+ igraph_neimode_t mode);
+DECLDIR int igraph_adjlist_init_empty(igraph_adjlist_t *al, igraph_integer_t no_of_nodes);
+DECLDIR igraph_integer_t igraph_adjlist_size(const igraph_adjlist_t *al);
+DECLDIR int igraph_adjlist_init_complementer(const igraph_t *graph,
+ igraph_adjlist_t *al,
+ igraph_neimode_t mode,
+ igraph_bool_t loops);
+DECLDIR void igraph_adjlist_destroy(igraph_adjlist_t *al);
+DECLDIR void igraph_adjlist_clear(igraph_adjlist_t *al);
+DECLDIR void igraph_adjlist_sort(igraph_adjlist_t *al);
+DECLDIR int igraph_adjlist_simplify(igraph_adjlist_t *al);
+DECLDIR int igraph_adjlist_remove_duplicate(const igraph_t *graph,
+ igraph_adjlist_t *al);
+DECLDIR int igraph_adjlist_print(const igraph_adjlist_t *al);
+DECLDIR int igraph_adjlist_fprint(const igraph_adjlist_t *al, FILE *outfile);
+DECLDIR igraph_bool_t igraph_adjlist_has_edge(igraph_adjlist_t* al, igraph_integer_t from, igraph_integer_t to, igraph_bool_t directed);
+DECLDIR int igraph_adjlist_replace_edge(igraph_adjlist_t* al, igraph_integer_t from, igraph_integer_t oldto, igraph_integer_t newto, igraph_bool_t directed);
/* igraph_vector_int_t *igraph_adjlist_get(const igraph_adjlist_t *al, */
/* igraph_integer_t no); */
@@ -81,24 +72,24 @@ int igraph_adjlist_replace_edge(igraph_adjlist_t* al, igraph_integer_t from, igr
*/
#define igraph_adjlist_get(al,no) (&(al)->adjs[(long int)(no)])
-int igraph_adjlist(igraph_t *graph, const igraph_adjlist_t *adjlist,
- igraph_neimode_t mode, igraph_bool_t duplicate);
+DECLDIR int igraph_adjlist(igraph_t *graph, const igraph_adjlist_t *adjlist,
+ igraph_neimode_t mode, igraph_bool_t duplicate);
typedef struct igraph_inclist_t {
igraph_integer_t length;
igraph_vector_int_t *incs;
} igraph_inclist_t;
-int igraph_inclist_init(const igraph_t *graph,
- igraph_inclist_t *il,
- igraph_neimode_t mode);
-int igraph_inclist_init_empty(igraph_inclist_t *il, igraph_integer_t n);
-void igraph_inclist_destroy(igraph_inclist_t *il);
-void igraph_inclist_clear(igraph_inclist_t *il);
-int igraph_inclist_remove_duplicate(const igraph_t *graph,
- igraph_inclist_t *il);
-int igraph_inclist_print(const igraph_inclist_t *il);
-int igraph_inclist_fprint(const igraph_inclist_t *il, FILE *outfile);
+DECLDIR int igraph_inclist_init(const igraph_t *graph,
+ igraph_inclist_t *il,
+ igraph_neimode_t mode);
+DECLDIR int igraph_inclist_init_empty(igraph_inclist_t *il, igraph_integer_t n);
+DECLDIR void igraph_inclist_destroy(igraph_inclist_t *il);
+DECLDIR void igraph_inclist_clear(igraph_inclist_t *il);
+DECLDIR int igraph_inclist_remove_duplicate(const igraph_t *graph,
+ igraph_inclist_t *il);
+DECLDIR int igraph_inclist_print(const igraph_inclist_t *il);
+DECLDIR int igraph_inclist_fprint(const igraph_inclist_t *il, FILE *outfile);
/**
* \define igraph_inclist_get
@@ -123,12 +114,12 @@ typedef struct igraph_lazy_adjlist_t {
igraph_lazy_adlist_simplify_t simplify;
} igraph_lazy_adjlist_t;
-int igraph_lazy_adjlist_init(const igraph_t *graph,
- igraph_lazy_adjlist_t *al,
- igraph_neimode_t mode,
- igraph_lazy_adlist_simplify_t simplify);
-void igraph_lazy_adjlist_destroy(igraph_lazy_adjlist_t *al);
-void igraph_lazy_adjlist_clear(igraph_lazy_adjlist_t *al);
+DECLDIR int igraph_lazy_adjlist_init(const igraph_t *graph,
+ igraph_lazy_adjlist_t *al,
+ igraph_neimode_t mode,
+ igraph_lazy_adlist_simplify_t simplify);
+DECLDIR void igraph_lazy_adjlist_destroy(igraph_lazy_adjlist_t *al);
+DECLDIR void igraph_lazy_adjlist_clear(igraph_lazy_adjlist_t *al);
/* igraph_vector_t *igraph_lazy_adjlist_get(igraph_lazy_adjlist_t *al, */
/* igraph_integer_t no); */
/**
@@ -150,8 +141,8 @@ void igraph_lazy_adjlist_clear(igraph_lazy_adjlist_t *al);
#define igraph_lazy_adjlist_get(al,no) \
((al)->adjs[(long int)(no)] != 0 ? ((al)->adjs[(long int)(no)]) : \
(igraph_lazy_adjlist_get_real(al, no)))
-igraph_vector_t *igraph_lazy_adjlist_get_real(igraph_lazy_adjlist_t *al,
- igraph_integer_t no);
+DECLDIR igraph_vector_t *igraph_lazy_adjlist_get_real(igraph_lazy_adjlist_t *al,
+ igraph_integer_t no);
typedef struct igraph_lazy_inclist_t {
const igraph_t *graph;
@@ -160,11 +151,11 @@ typedef struct igraph_lazy_inclist_t {
igraph_neimode_t mode;
} igraph_lazy_inclist_t;
-int igraph_lazy_inclist_init(const igraph_t *graph,
- igraph_lazy_inclist_t *il,
- igraph_neimode_t mode);
-void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il);
-void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il);
+DECLDIR int igraph_lazy_inclist_init(const igraph_t *graph,
+ igraph_lazy_inclist_t *il,
+ igraph_neimode_t mode);
+DECLDIR void igraph_lazy_inclist_destroy(igraph_lazy_inclist_t *il);
+DECLDIR void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il);
/**
* \define igraph_lazy_inclist_get
@@ -185,22 +176,22 @@ void igraph_lazy_inclist_clear(igraph_lazy_inclist_t *il);
#define igraph_lazy_inclist_get(al,no) \
((al)->incs[(long int)(no)] != 0 ? ((al)->incs[(long int)(no)]) : \
(igraph_lazy_inclist_get_real(al, no)))
-igraph_vector_t *igraph_lazy_inclist_get_real(igraph_lazy_inclist_t *al,
- igraph_integer_t no);
+DECLDIR igraph_vector_t *igraph_lazy_inclist_get_real(igraph_lazy_inclist_t *al,
+ igraph_integer_t no);
/*************************************************************************
* DEPRECATED TYPES AND FUNCTIONS
*/
typedef igraph_inclist_t igraph_adjedgelist_t;
-int igraph_adjedgelist_init(const igraph_t *graph,
- igraph_inclist_t *il,
- igraph_neimode_t mode);
-void igraph_adjedgelist_destroy(igraph_inclist_t *il);
-int igraph_adjedgelist_remove_duplicate(const igraph_t *graph,
- igraph_inclist_t *il);
-int igraph_adjedgelist_print(const igraph_inclist_t *il, FILE *outfile);
+DECLDIR int igraph_adjedgelist_init(const igraph_t *graph,
+ igraph_inclist_t *il,
+ igraph_neimode_t mode);
+DECLDIR void igraph_adjedgelist_destroy(igraph_inclist_t *il);
+DECLDIR int igraph_adjedgelist_remove_duplicate(const igraph_t *graph,
+ igraph_inclist_t *il);
+DECLDIR int igraph_adjedgelist_print(const igraph_inclist_t *il, FILE *outfile);
/**
* \define igraph_adjedgelist_get
@@ -216,10 +207,10 @@ int igraph_adjedgelist_print(const igraph_inclist_t *il, FILE *outfile);
typedef igraph_lazy_inclist_t igraph_lazy_adjedgelist_t;
-int igraph_lazy_adjedgelist_init(const igraph_t *graph,
- igraph_lazy_inclist_t *il,
- igraph_neimode_t mode);
-void igraph_lazy_adjedgelist_destroy(igraph_lazy_inclist_t *il);
+DECLDIR int igraph_lazy_adjedgelist_init(const igraph_t *graph,
+ igraph_lazy_inclist_t *il,
+ igraph_neimode_t mode);
+DECLDIR void igraph_lazy_adjedgelist_destroy(igraph_lazy_inclist_t *il);
/**
* \define igraph_lazy_adjedgelist_get
@@ -234,8 +225,8 @@ void igraph_lazy_adjedgelist_destroy(igraph_lazy_inclist_t *il);
#define igraph_lazy_adjedgelist_get(al,no) \
((al)->incs[(long int)(no)] != 0 ? ((al)->incs[(long int)(no)]) : \
(igraph_lazy_adjedgelist_get_real(al, no)))
-igraph_vector_t *igraph_lazy_adjedgelist_get_real(igraph_lazy_inclist_t *al,
- igraph_integer_t no);
+DECLDIR igraph_vector_t *igraph_lazy_adjedgelist_get_real(igraph_lazy_inclist_t *al,
+ igraph_integer_t no);
__END_DECLS
#endif
@@ -28,15 +28,7 @@
#ifndef ARPACK_H
#define ARPACK_H
-#undef __BEGIN_DECLS
-#undef __END_DECLS
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
-#endif
+#include "igraph_decls.h"
__BEGIN_DECLS
@@ -297,11 +289,11 @@ typedef struct igraph_arpack_storage_t {
igraph_real_t *workev;
} igraph_arpack_storage_t;
-void igraph_arpack_options_init(igraph_arpack_options_t *o);
+DECLDIR void igraph_arpack_options_init(igraph_arpack_options_t *o);
-int igraph_arpack_storage_init(igraph_arpack_storage_t *s, long int maxn,
- long int maxncv, long int maxldv, igraph_bool_t symm);
-void igraph_arpack_storage_destroy(igraph_arpack_storage_t *s);
+DECLDIR int igraph_arpack_storage_init(igraph_arpack_storage_t *s, long int maxn,
+ long int maxncv, long int maxldv, igraph_bool_t symm);
+DECLDIR void igraph_arpack_storage_destroy(igraph_arpack_storage_t *s);
/**
* \typedef igraph_arpack_function_t
@@ -323,18 +315,18 @@ void igraph_arpack_storage_destroy(igraph_arpack_storage_t *s);
typedef int igraph_arpack_function_t(igraph_real_t *to, const igraph_real_t *from,
int n, void *extra);
-int igraph_arpack_rssolve(igraph_arpack_function_t *fun, void *extra,
- igraph_arpack_options_t *options,
- igraph_arpack_storage_t *storage,
- igraph_vector_t *values, igraph_matrix_t *vectors);
+DECLDIR int igraph_arpack_rssolve(igraph_arpack_function_t *fun, void *extra,
+ igraph_arpack_options_t *options,
+ igraph_arpack_storage_t *storage,
+ igraph_vector_t *values, igraph_matrix_t *vectors);
-int igraph_arpack_rnsolve(igraph_arpack_function_t *fun, void *extra,
- igraph_arpack_options_t *options,
- igraph_arpack_storage_t *storage,
- igraph_matrix_t *values, igraph_matrix_t *vectors);
+DECLDIR int igraph_arpack_rnsolve(igraph_arpack_function_t *fun, void *extra,
+ igraph_arpack_options_t *options,
+ igraph_arpack_storage_t *storage,
+ igraph_matrix_t *values, igraph_matrix_t *vectors);
-int igraph_arpack_unpack_complex(igraph_matrix_t *vectors, igraph_matrix_t *values,
- long int nev);
+DECLDIR int igraph_arpack_unpack_complex(igraph_matrix_t *vectors, igraph_matrix_t *values,
+ long int nev);
__END_DECLS
@@ -24,15 +24,7 @@
#ifndef IGRAPH_ARRAY_H
#define IGRAPH_ARRAY_H
-#undef __BEGIN_DECLS
-#undef __END_DECLS
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS /* empty */
-# define __END_DECLS /* empty */
-#endif
+#include "igraph_decls.h"
__BEGIN_DECLS
Oops, something went wrong.

0 comments on commit ac88d12

Please sign in to comment.