You are not logged in.

#1 2021-07-23 19:20:00

ArchHippo
Member
Registered: 2021-06-10
Posts: 11

[SOLVED] VS Code can't find #include <lua.h>

Hi.  I've installed VS Code and everything works correctly as described here:

https://code.visualstudio.com/docs/cpp/config-linux

I'm now trying to use the lua library for some simple tutorials, but VS Code complains that it can't find the include files (red squiggly line under #include <lua.h>, and error on compilation from within vscode).  I can manually compile and link using g++ with no issue from a terminal.  The .h files are in /usr/include (I installed the lua package) so I would've thought vscode would pick them up.

I tried #include <regex.h> as a test (/usr/include/regex.h exists) and it picks that up no problem.

Does anyone have any idea what I might be doing wrong?  Thanks for any suggestions.

Last edited by ArchHippo (2021-07-27 10:24:26)

Offline

#2 2021-07-26 11:35:47

ArchHippo
Member
Registered: 2021-06-10
Posts: 11

Re: [SOLVED] VS Code can't find #include <lua.h>

I had installed vscode from the "Software" application in gnome (icon: briefcase with circle, triangle and square).  I uninstalled this and installed using pacman -S code instead, which appears to install something called vscode oss.  This seems to be built to work in Arch, and the problems I was having have now vanished.  To be replaced with other minor issues which I seem to be working around as fixes are easy to find, but that's another story...

Offline

#3 2021-07-26 12:09:39

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,350

Re: [SOLVED] VS Code can't find #include <lua.h>

Upstream install instructions like those often fail on archlinux and Gnome software center / KDE discover should be the last place to look for software on arclinux *.

I think you'll find https://wiki.archlinux.org/title/Visual_Studio_Code interesting/useful



* https://wiki.archlinux.org/ , https://archlinux.org/packages/ and https://aur.archlinux.org/ are the first places to look.

Last edited by Lone_Wolf (2021-07-26 12:10:27)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB