Lost Intellisense after reorganizing project
Hi! I just used premake5 beta1 to organize my recent project and even though the structure is as desired and no linking errors manifest out of nowhere, i suddenly lost intellisense and colors of certain variables to all included files. Moreover, when i try to add a new class item, i get a message like "{DirPath}/foo.h is not in project" and creates only the header file on the root project directory. What do I do wrong? Here is the premake5.lua:
workspace "VolumeInspector"
architecture "x64"
configurations
{
"Debug",
"Release"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "VolumeInspector"
kind "ConsoleApp"
language "C++"
targetdir ("bin/" ..outputdir.. "/%{prj.name}")
objdir ("bin-int/" ..outputdir.. "/%{prj.name}")
files
{
"main.cpp",
"src/Engine/Core/**.h",
"src/Engine/Core/**.cpp"
}
includedirs
{
"External/spdlog/include"
}
filter "system:windows"
cppdialect "c++17"
staticruntime "on"
systemversion "latest"
filter "configurations:Debug"
defines "DEBUG"
symbols "on"
filter "configurations:Release"
defines "NDEBUG"
optimize "on"
i suddenly lost intellisense and colors of certain variables to all included files.
Which ones? It's possible that you just need to add src/Engine/Core to includedirs, and maybe src/Engine/Core/**. In situations like this it's best to compare with what you had and what you have now in the settings.
Moreover, when i try to add a new class item, i get a message like "{DirPath}/foo.h is not in project" and creates only the header file on the root project directory.
I'm not sure about this one, nothing looks wrong in the Premake script.
@samsinsane Thank you for your response. I did try that (both cases src/Engine/Core and src/Engine/Core/**) but it didn't appear to fix the problem. I even tried using sysincludedirs instead, but to no avail again. There's nothing wrong with the project structure what so ever and the code compiles normally, only intellisense is broken. Is there maybe something i am missing in the premake file? Some modifier of sorts to explicitly specify keeping intellisense settings as defaults?
You might need to clean build directory (remove intellisense Database) so it rebuild its database.