Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include - fatal error - no such file or directory (Eigen/Dense) #657

Open
krzysz28tof opened this issue Sep 27, 2024 · 8 comments
Open

Include - fatal error - no such file or directory (Eigen/Dense) #657

krzysz28tof opened this issue Sep 27, 2024 · 8 comments
Assignees
Labels
bug Something isn't working more info needed More info is needed from the community for us to properly triage and investigate
Milestone

Comments

@krzysz28tof
Copy link

Setup

  • VS Code
  • Makefile tools (VS Code)
  • Arch Linux
  • Eigen (c++ library, installed via pacman)
  • /usr/include/eigen3/Eigen (location of Eigen library)
  • ln -s /usr/include/eigen3/Eigen Eigen (made a symbolic link in /usr/include folder)

Problem

  • running make in the terminal works
  • running inside VS Code with Makefile tools gives error, it cannot find my library (Eigen)
  • removing IntelliSense doesn't solve the issue, running with Makefile still gives the same error

Error message

main.cpp:2:10: fatal error: Eigen/Dense: No such file or directory
2 | #include <Eigen/Dense>

@Yingzi1234 Yingzi1234 added more info needed More info is needed from the community for us to properly triage and investigate and removed triage labels Sep 30, 2024
@Yingzi1234
Copy link
Collaborator

@krzysz28tof Thank you for your github issue! To better reproduce your problem, could you provide us with a video of your reproduction project and reproduction steps? This will help us greatly in our investigation of your problem.

@krzysz28tof
Copy link
Author

Steps

  • install Eigen c++ library (via pacman on archlinux, installed into /usr/include/eigen3/Eigen)
  • install VS Code
  • download simple C/C++ extension (VS Code)
  • download Makefile tools extension (VS Code)
  • create Makefile (target "all", just compile main.cpp)
  • configure Makefile tools using the Makfile tools icon in VS Code
  • meaning set makefile path, build target, launch target

Problem description

  • in terminal running make works
  • in VS Code Makefile tools doesn't want to compile the code, saying it doesn't know the "Eigen" library

@krzysz28tof
Copy link
Author

Screencast.From.2024-09-30.11-00-40.webm

@Yingzi1234
Copy link
Collaborator

@krzysz28tof Thanks for the reply, sorry I wanted to ask please do you have a dense folder under your Eigen folder?

@krzysz28tof
Copy link
Author

krzysz28tof commented Oct 12, 2024

@Yingzi1234 Yes

@Yingzi1234 Yingzi1234 added bug Something isn't working and removed more info needed More info is needed from the community for us to properly triage and investigate labels Oct 18, 2024
@Yingzi1234
Copy link
Collaborator

Hi @krzysz28tof @gcampbell-msft We can reproduce this issue, you can get the details below. This issue can be reproduced on Windows, Linux, Mac platforms. Thank you!

ENV:
VSCode: 1.94.2
Makefile tools: 0.12.8(pre-release)
C/C++: 1.22.9

Repro steps:

  1. Install Eigen c++ library
  2. Download and open this folder Test2.zip with VSCode
  3. Click F1 and run command "Makefile: configure"
  4. Open terminal window and run g++ -o main main.cpp

Actual result:
The error will be displayed:

main.cpp:2:10: fatal error: Eigen/Dense: No such file or directory
2 | #include <Eigen/Dense>

Image

@gcampbell-msft gcampbell-msft added this to the 0.12.0 milestone Dec 4, 2024
@gcampbell-msft
Copy link
Collaborator

@krzysz28tof @Yingzi1234 Apologies for the delay, we've added this to our backlog, thanks!

@gcampbell-msft gcampbell-msft self-assigned this Dec 4, 2024
@gcampbell-msft gcampbell-msft removed their assignment Dec 11, 2024
@gcampbell-msft
Copy link
Collaborator

@Yingzi1234 @krzysz28tof I just downloaded the repro and I was able to get it to work on my machine. One thing that I had to do was once I got the include directory correct such that it worked on the command-line, I had to run make clean and then reload the VS Code window, and then the Intellisense worked as expected and the running of Makefile configure and Makefile build worked as expected.

Also, my include directory after installing with sudo apt install libeigen3-dev was not /usr/include/eigen3/Eigen, it was /usr/include/eigen3.

Do any of these suggestions make your case work, like it did on my machine?

@gcampbell-msft gcampbell-msft added the more info needed More info is needed from the community for us to properly triage and investigate label Dec 20, 2024
@gcampbell-msft gcampbell-msft self-assigned this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more info needed More info is needed from the community for us to properly triage and investigate
Projects
None yet
Development

No branches or pull requests

3 participants