jupyter-xeus / xeus-cling

Jupyter kernel for the C++ programming language
BSD 3-Clause "New" or "Revised" License
3.01k stars 294 forks source link

`Eigen::Matrix3f A;` gives no matching constructor for initialization of 'Eigen::Matrix3f' #500

Open RajS999 opened 8 months ago

RajS999 commented 8 months ago

I installed eigen, jupyterlab and xeus-cling as follows:

conda install -c conda-forge eigen
conda install -c conda-forge jupyterlab 
conda install -c conda-forge xeus-cling 

Then I started jupyter lab as follows:

~/workspaces/conda_py310_jupyter$ jupyter lab . 

Then I tried following in new C++ notebook:

#include <eigen3/Eigen/Core>
Eigen::Matrix3f A;

But it gives me following error

input_line_27:2:18: error: no matching constructor for initialization of 'Eigen::Matrix3f' (aka 'Matrix<float, 3, 3>')
 Eigen::Matrix3f A;
                 ^
Interpreter Error:

Here is the screenshot: image

Here is the yaml file of my conda environment (renamed to have txt extension since github does not allow to upload yaml): conda_env_py310.txt