[mlpack-git] [mlpack] bfd.h: config.h must be included before this header (#574)
Daniel Clarke
notifications at github.com
Tue Mar 15 11:54:25 EDT 2016
@rcurtin No problem at all. It may be ugly but here is one way...
diff --git a/src/mlpack/core/util/backtrace.cpp b/src/mlpack/core/util/backtrace.cpp
index 494242c..ed5d469 100644
--- a/src/mlpack/core/util/backtrace.cpp
+++ b/src/mlpack/core/util/backtrace.cpp
@@ -19,7 +19,19 @@
#include <signal.h>
#include <unistd.h>
#include <cxxabi.h>
- #include <bfd.h>
+ #ifndef PACKAGE
+ #define PACKAGE
+ #ifndef PACKAGE_VERSION
+ #define PACKAGE_VERSION
+ #include <bfd.h>
+ #undef PACKAGE_VERSION
+ #else
+ #include <bfd.h>
+ #endif
+ #undef PACKAGE
+ #else
+ #include <bfd.h>
+ #endif
#include <dlfcn.h>
#endif
If you need bfd.h anywhere else you'd want to have a local bfd.h that wraps it, but it successfully compiled for me so I'm guessing for now it's only needed there.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/574#issuecomment-196892581
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160315/55e3394e/attachment-0001.html>
More information about the mlpack-git
mailing list