Re: [eigen] Possible Bug ?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]



I found the one line triggering the issue. Using the stackoverflow example,the following main.cpp file is sufficient to trigger the issue:


namespace riri { // the namespace is optional
  enum { fifi = sizeof(int) };
}

#include "func.h"

int main() {
    std::vector<Eigen::Matrix<double, 2, 2> > m;  
    f<2>(m);
}


that is, adding the declaration:

enum { fifi = sizeof(int) };

*before* including Eigen makes gcc's linker nuts.

I'm clueless.

gael



On Tue, Jul 15, 2014 at 11:38 AM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
It's been a long time since we last got such a weird compiler issue!

That one goes away in C++11 mode, making it even odder.

gael



On Tue, Jul 15, 2014 at 10:54 AM, Matthieu Brucher <matthieu.brucher@xxxxxxxxx> wrote:
It seems to be a header clash with GCC  :/

2014-07-15 10:47 GMT+02:00 Andreas Barth <andreas-barth@xxxxxx>:
> See this:
>
> http://stackoverflow.com/questions/24730981/undefined-reference-error-from-gcc-using-a-template-with-a-stdvector-and-an-ei
>
> The problem is an 'undefined reference' linker error when defining a
> template function specialization including a
> std::vector<Eigen::Matrix>> as parameter.
> The described behavior has been reproduced by different users and with
> different versions of GCC using eigen_3.2.1
>
>
>
>



--
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher
Music band: http://liliejay.com/






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/