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

Merged
merged 5 commits into from Aug 14, 2016

Projects

None yet

2 participants

@abeham
Contributor
abeham commented Aug 12, 2016

Two changes are critical, I don't know if you want to make them:

  • src/cliquer/graph.c was renamed to src/cliquer/graph2.c
  • src/heap.c was renamed to src/heap2.c

Otherwise in Visual Studio (2013) both heap.c and heap.cc build to the same .o file and overwrite each other.

Other than that:

  • I included PRPACK in makefile's echosources target so that these are part of the visual studio project
  • I added MSDOS to the compiler's preprocessor definitions (otherwise there is a compile error)
  • I removed the __BEGIN_DECL and __END_DECL directives from each header file and put them in igraph_decl.h which is included in all .h files that had these directives
  • I added DECLDIR directive to all "public" functions which is either empty, or when Visual Studio is used as compiler is __declspec(dllexport) when building with IGRAPH_EXPORTS flag or __declspec(dllimport) when building without the flag
abeham added some commits Aug 3, 2016
@abeham abeham Fix linker errors and add declspec dll exports to several functions f7e18bc
@abeham abeham Added igraph_decls header and additional DECLDIR declarations
0b7db89
@ntamas
Member
ntamas commented Aug 12, 2016

Thanks for your work on this, it looks great!

I would prefer renaming src/cliquer/graph.c to src/cliquer/cliquer_graph.c and src/bliss/heap.cc to src/bliss/bliss_heap.cc instead - feels more readable than graph2.c and heap2.c.

Also, the AppVeyor build has failed for one of the build configurations because MSVC does not seem to include stdint.h:

https://ci.appveyor.com/project/ntamas/igraph/build/1.0.55/job/6x86orpkpp7d0xyf#L3494

To be honest, I don't quite understand why it fails - more precisely, I don't understand how the other three build configurations on AppVeyor could succeed if stdint.h is missing. It can even happen that prpack_solver.cpp does not need stdint.h at all. Can you try recompiling this without stdint.h on your machine?

@abeham abeham renamed files and removed stdint.h include in prpack_solver
20b7cd7
@abeham
Contributor
abeham commented Aug 13, 2016

Yes, very strange that only one failed. prpack_solver.cpp builds fine in VS2013 without stdint.h so I removed it. I also made the requested filename changes.

abeham added some commits Aug 13, 2016
@abeham abeham reusing stdint include from bignum.h in prpack_csc.h
cb02d38
@abeham abeham Added igraph_decls.h to public headers in Makefile.am and tweaked inc…
…lude of stdint in prpack_csc.h
0467290
@abeham
Contributor
abeham commented Aug 13, 2016

Okay, I think that did it. I had to avoid including stdint.h also for MINGW builds. But reusing pstdint.h was not the way to go...

@ntamas
Member
ntamas commented Aug 14, 2016

Thanks, now I think this one is ready for merging.

@ntamas ntamas merged commit ac88d12 into igraph:master Aug 14, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment