mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix linking errors with multiply defined functions
This commit is contained in:
@@ -162,6 +162,13 @@
|
||||
#define EIGEN_DONT_INLINE
|
||||
#endif
|
||||
|
||||
// this macro allows to get rid of linking errors about multiply defined functions.
|
||||
// - static is not very good because it prevents definitions from different object files to be merged.
|
||||
// So static causes the resulting linked executable to be bloated with multiple copies of the same function.
|
||||
// - inline is not perfect either as it unwantedly hints the compiler toward inlining the function.
|
||||
#define EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
|
||||
#define EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS inline
|
||||
|
||||
#if (defined __GNUC__)
|
||||
#define EIGEN_DEPRECATED __attribute__((deprecated))
|
||||
#elif (defined _MSC_VER)
|
||||
|
||||
Reference in New Issue
Block a user