Page 1 of 1

g++ -std=c++11 compilation fails

PostPosted: Sun Jun 16, 2013 2:19 am
by hazelnusse
The following trivial example fails when compiling with the C++11 flag of g++:
Code: Select all
#include <lapacke.h>
int main(){}


The command to compile I tested was:
$ g++ -std=c++11 -c test_lapack.cpp

The number of errors reported by the compiler are massive, probably most are repetitions of the same type of error. I couldn't figure out what needed to be fixed, the text file with all the errors was 297540 bytes. I have attached the errors in a tar.bz2 file.

Re: g++ -std=c++11 compilation fails

PostPosted: Sun Jun 16, 2013 2:56 pm
by hazelnusse
I'm not sure if this is the recommended way to fix this, but if I put the following #define's at the top of my file, the problem is fixed:

Code: Select all
#define HAVE_LAPACK_CONFIG_H
#define LAPACK_COMPLEX_CPP
#include <lapacke.h>


So, I guess this isn't really a bug, but maybe more prominent documentation would be helpful.