Cannot find the header files when compiling with WSL Linux distributive in VS code

967 views
Skip to first unread message

keassyguang

unread,
Jan 16, 2022, 3:13:26 AM1/16/22
to deal.II User Group

Hi, everyone. I'm interested in deal.ii, but I did have trouble configuring the deal.ii.

I am trying to compile the program for Linux in VS code (version 1.63.2) using WSL (Windows Subsystem for Linux) ubuntu 20.04.3. I successfully compile the "Hello, World!" program, but when I try to compile the tutorial programs shown in dell.ii documentation, such as the step-1, the compilation terminated with an error message "No such file or directory". Then, the system includePath in VS code has been set to "/usr/include/**" and other libs as shown in the below figures, however, it dosenot work.

1.png2.png

Later, I manually edit some head files. For example, as shown in the below figure, I know the "Kokkos_MasterLock.hpp" file is in the directory of "/usr/include/trilinos", so I modified the 55th line of "Kokkos_Core_fwd.hpp" file by adding the "trilions" directory into the path "#include <trilinos/Kokkos_MasterLock.hpp>" (the original is "#include <Kokkos_MasterLock.hpp>"). After that, the compiler can find the "Kokkos_MasterLock.hpp" file, however, the compilation terminated with another new file named "Kokkos_Macros.hpp". Truly, I can edit the path as the aforementioned method, it is impossible to edit all the files using this way. So, can someone tell me how to compile the program for Linux in VS code using WSL? It will be of great help to me.

3.png4.png5.png

Raghunandan Pratoori

unread,
Jan 16, 2022, 8:21:50 AM1/16/22
to deal.II User Group
Hi,

I use VS Code with WSL. I followed the instructions on these 2 pages and was able to get it to work -

Also, how did you install deal.ii in wsl? I used the PPA and it took care of all the paths to be added.

Best,
Raghunandan.

Jiang Hu

unread,
Jan 28, 2022, 8:10:06 PM1/28/22
to dea...@googlegroups.com
Hi Raghunandan,

what is PPA? I am trying to set up in vscode, would like to know.

Thanks

Martin


--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/48537997-41c2-41b5-a260-18e7f320aef5n%40googlegroups.com.

Wells, David

unread,
Mar 9, 2022, 12:07:55 PM3/9/22
to dea...@googlegroups.com
Hello there,

Sorry for the long delay in the reply. If you didn't figure this out yet: look under


that is linked to from the 'ubuntu' section of https://www.dealii.org/download.html . A PPA contains packages outside the normal distribution channel. You can follow the directions at the first link to add the new PPA and download deal.II.


@keassyguang did those instructions work for you?

Best,
Davd

From: dea...@googlegroups.com <dea...@googlegroups.com> on behalf of Jiang Hu <jian...@gmail.com>
Sent: Friday, January 28, 2022 8:09 PM
To: dea...@googlegroups.com <dea...@googlegroups.com>
Subject: Re: [deal.II] Re: Cannot find the header files when compiling with WSL Linux distributive in VS code
 
Reply all
Reply to author
Forward
0 new messages