Using Eigen (Third Party Library) in my plugin

Hey everyone,

I am working on a plugin and wish to use the included third party library Eigen (Engine->ThirdParty->Eigen) to handle the matrices. Fortunately I can see that there are a handful of other plugins that use Eigen (FullbodyIK, AlembicImporter etc) and the way in which they include the library is to include the module “Eigen” in the build file and then encase “#include <Eigen/Dense>” in some code to emit errors when Eigen is needed. When I do this myself though I have no such luck. It simply says it can’t find the library.

Does anyone have any ideas as to why this wouldn’t work? I feel I am missing a step when including Engine->ThirdParty libraries :confused:

1 Like

It’s seems like Eigen you get from “ThirdParty” in engine folder is incomplete and is missing some files. What helped me to solve exactly the same problem for UE4.27 is to download entire engine source code from , compile it and copy Eigen from there to my engine folder (I’ve attached it below, so you won’t need to recompile the engine; hopefully it will work for anyone else too).
Eigen_recompiled_427.rar (958.6 KB)

1 Like

Hey Andrej730!

This worked for me thanks! Admittedly though I found this same fix a few days following my original post and failed to update it. Sorry for that.

Interestingly in UE 5.0 you can now access the Eigen module. If anyone here upgrades their project you will have to remove Eigen from your project Third Party folder, or else your project may not package.

Thank you though, and apologies for not updating this post.