使用提取时找不到特征

发布于 2025-02-11 05:10:39 字数 1185 浏览 0 评论 0原文

我试图将特征库包括在我的项目中。

我正在使用cmake和fetchcontent来构建项目。我能够使用相同的方法包括另一个库。

”的snippit:cmake

if (NOT TARGET endftk )
           FetchContent_Declare( endftk
           GIT_REPOSITORY https://github.com/njoy/ENDFtk.git
           GIT_TAG origin/develop )
           FetchContent_MakeAvailable( endftk)
endif()

if (NOT TARGET Eigen)
        FetchContent_Declare( Eigen
        GIT_REPOSITORY  https://gitlab.com/libeigen/eigen.git
        GIT_TAG origin/master )
        FetchContent_MakeAvailable( Eigen)
endif()

 target_link_libraries(POLR
               INTERFACE ENDFtk
               INTERFACE eigen )

下面包括我的

#include <ENDFtk.hpp>
#include <Eigen>      

'

#include <Eigen3>
#include <eigen> 
#include <Eigen.hpp>

“依赖 尝试制作:

fatal error: Eigen: No such file or directory
 

但是,我没有这样的问题,包括和使用EndFTK库。

我在build/_deps文件夹中查看,我确实在那里看到了eigen(and endftk)。

有人知道我需要做什么才能使特征包括吗?

我正在使用: CMAKE版本3.22.1 GCC版本11.3.0

请让我知道我是否有任何关键信息。

注意:POLR是我项目的名称。

I am attempting to include the Eigen libraries into my project.

I am using CMake and FetchContent to build the project. I was able to include another library using the same method.

A snippit of my "dependencies.cmake" is included below:

if (NOT TARGET endftk )
           FetchContent_Declare( endftk
           GIT_REPOSITORY https://github.com/njoy/ENDFtk.git
           GIT_TAG origin/develop )
           FetchContent_MakeAvailable( endftk)
endif()

if (NOT TARGET Eigen)
        FetchContent_Declare( Eigen
        GIT_REPOSITORY  https://gitlab.com/libeigen/eigen.git
        GIT_TAG origin/master )
        FetchContent_MakeAvailable( Eigen)
endif()

I link both libraries using:

 target_link_libraries(POLR
               INTERFACE ENDFtk
               INTERFACE eigen )

in my main header file I then include the libraries using:

#include <ENDFtk.hpp>
#include <Eigen>      

I've also tried using the following:

#include <Eigen3>
#include <eigen> 
#include <Eigen.hpp>

All of which fail with the following error message when attempting to make:

fatal error: Eigen: No such file or directory
 

However, I have no such issue including and using the ENDFtk library.

I've looked in my build/_deps folder and I do see Eigen (and ENDFtk) there.

Does anybody know what I need to do in order to get Eigen to include?

I'm using:
cmake version 3.22.1
gcc version 11.3.0

Please let me know if there is any crucial information I'm leaving out.

Note: POLR is the name of my project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文