Include a file in C with VsCodium and WSL

Viewed 87

I'm trying to include a custom file into my program in C, and it compiles ok. However, VsCodium keeps complaining about "Squiggles" and "includePath" (don't know what that means), actually, I don't know precisely how to configure the ".vscode/c_cpp_properties.json" file as I am using WSL to compile the code and VsCodium is installed on Windows.

Here is the line:

#include "./types.h"
// #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (\\wsl$\Arch\home\{*}\{*}\{*}.c).C/C++(1696)
// cannot open source file "./types.h"

What should I do? It's a little annoying although it's working

1 Answers

Go to File->Preferences->Settings.

Optional: Switch to the Workspace tab (if you only want this to take effect on the current workspace).

In the search box, type in c_cpp include path or something similar.

Find the C_Cpp->Default: Include path field, then click Add item.

Enter your include path which contains the file you want to include.

Related