viewtopic.php?f=2&t=2284
But this issue is still present in lapack 3.4.2 with gcc 4.7.2 on Fedora 17.
It would be great if such a fix could make it in the next release (3.4.3?)
Here is the diff that was needed to fix the issue, only lapacke.h needs to be changed.
The issue is that there cannot be #include <complex.h> (which has templates) inside an extern "C" block.
- Code: Select all
@@ -41,10 +41,6 @@
#include "lapacke_config.h"
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
#include <stdlib.h>
#ifndef lapack_int
@@ -106,6 +102,10 @@ lapack_complex_double lapack_make_complex_double( double re, double im );
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
#ifndef LAPACKE_malloc
#define LAPACKE_malloc( size ) malloc( size )
#endif