Adding Eigen library to Qt Creator



  • I am new to Qt and I have a project I am working on and need to add external headers, that is the Eigen library for matrices. How can I do this. Someone give me a step by step procedure. Remember I am new


  • Moderators

    Hi @iMarcK, and welcome to the Qt Dev Net!

    @iMarcK said in Adding Eigen library to Qt Creator:

    I am new to Qt and I have a project I am working on and need to add external headers, that is the Eigen library for matrices. How can I do this.

    Read http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html (but ignore the section on "Example of Adding Internal Libraries"). Let us know if something is unclear.

    Someone give me a step by step procedure. Remember I am new

    The two-step procedure in the link should be accessible to newcomers.


  • Qt Champions 2017

    I use Eigen on a daily basis, there's no real setting up to use it - it's a template library, meaning only headers. You only add its location to the INCLUDEPATH variable in your project file and you're good to go (see @JKSH's link and here). Since I use linux and I already have eigen in my system path, I don't even do that step, I just code.

    PS.
    A piece of advice for after you get it working:
    Don't use auto with Eigen! People have been bitten by it, and there's even a dedicated page in the docs why.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.