Problem in lapacke.h

Open discussion regarding features, bugs, issues, vendors, etc.

Problem in lapacke.h

Postby bmoloney » Mon Mar 28, 2011 8:22 pm

Hello,

I found an issue with the header file for the C language API 'lapacke.h'. A few C++ library includes are inside of the 'extern "C"' block which causes many 'template with C linkage' errors when the header is included in a C++ file.

I fixed the issue with the below patch that simply moves the extern statement down a bit.


--- lapacke.h 2011-03-28 17:14:19.000000000 -0700
+++ lapacke.h.fixed 2011-03-28 16:31:57.000000000 -0700
@@ -42,10 +42,6 @@
#include "lapacke_config.h"
#endif

-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
#include <stdlib.h>

#ifndef lapack_int
@@ -168,6 +164,10 @@
#define LAPACK_NAME(lcname,UCNAME) lcname##_
#endif

+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
#define LAPACK_lsame LAPACK_NAME(lsame,LSAME)
lapack_logical LAPACK_lsame( char* ca, char* cb,
lapack_int lca, lapack_int lcb );
bmoloney
 
Posts: 1
Joined: Mon Mar 28, 2011 8:10 pm

Re: Problem in lapacke.h

Postby admin » Tue Mar 29, 2011 4:31 am

Thank you for reporting the problem.
This will be correct in the next LAPACKE release.
Julie
admin
Site Admin
 
Posts: 504
Joined: Wed Dec 08, 2004 7:07 pm


Return to User Discussion

Who is online

Users browsing this forum: bowenm and 3 guests